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.


    Webbrowser error

    Pythonista
    3
    4
    2794
    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.
    • jaredbidlow
      jaredbidlow last edited by

      I get this error a lot in the new version of pythonista imgur

      Here is the code snippet

      webbrowser.open('workflow://run-workflow?name=DownTube&input='+audio+titulo)
      
      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        Can you please put this line just above the line that has webbrowser.open() and then tell us what gets printed to the console?

        print(dir(webbrowser))
        
        1 Reply Last reply Reply Quote 0
        • jaredbidlow
          jaredbidlow last edited by

          Traceback (most recent call last):
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 279, in webview_did_finish_load
              self.set_url()
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 30, in set_url
              addr_bar.text = self.parse_url(url)
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 20, in parse_url
              return urlparse.urlparse(url).netloc
          AttributeError: 'NoneType' object has no attribute 'urlparse'
          Traceback (most recent call last):
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 279, in webview_did_finish_load
              self.set_url()
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 30, in set_url
              addr_bar.text = self.parse_url(url)
            File "/private/var/mobile/Containers/Shared/AppGroup/1A6C229C-4CF9-474A-A317-BE4422169DF1/Documents/webbrowser.py", line 20, in parse_url
              return urlparse.urlparse(url).netloc
          AttributeError: 'NoneType' object has no attribute 'urlparse'
          
          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by JonB

            uhh, are you writing your own webbrowser.py! Don't shadow builtin module names...
            Also, the error you posted isn't the same as the traceback. Do you have a link to the source of the webbrowser.py that you are using? It seems to be setting urlparse to None...

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