omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    UnicodeDecodeError in _appex.get_input()

    Pythonista
    pythonista unicode decode appex error
    3
    6
    4735
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ABLPHA
      ABLPHA last edited by ABLPHA

      Hi

      Can somebody help me? I tried to get link from AppStore's Share Sheet Extension, but when I typed _appex.get_input() this occurred:

      >>> _appex.get_input()
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      SystemError: <built-in function get_input> returned a result with an error set```
      
      How to ignore this error or read bytes?
      1 Reply Last reply Reply Quote 0
      • Cethric
        Cethric last edited by Cethric

        In general the _appex model is not really meant to be used as it is the backend for the appex wrapper module. Try using:

        import appex
        print(appex.get_text())
        print(appex.get_urls()) # or appex.get_url()
        
        ABLPHA 1 Reply Last reply Reply Quote 0
        • ABLPHA
          ABLPHA @Cethric last edited by

          @Cethric thanks for the answer, but when I typed print(appex.get_url()) the same error occurred.

          1 Reply Last reply Reply Quote 0
          • omz
            omz last edited by

            Which version of Pythonista are you using?

            ABLPHA 1 Reply Last reply Reply Quote 0
            • ABLPHA
              ABLPHA @omz last edited by

              @omz 3.0 (300018)

              1 Reply Last reply Reply Quote 0
              • omz
                omz last edited by

                @ABLPHA Could you please upgrade to the latest version (3.1) and check if the issue persists?

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors