firecat53 / urlscan

Mutt and terminal url selector (similar to urlview)
GNU General Public License v2.0
214 stars 38 forks source link

python errors #44

Closed hymie0 closed 6 years ago

hymie0 commented 6 years ago

Hello. I don't know anything about python, so all I can do is report this error that I get every time I try to run urlscan either from inside mutt or from the command line

Traceback (most recent call last):
  File "/usr/bin/urlscan", line 165, in <module>
    dedupe=args.dedupe)
  File "/usr/lib64/python2.7/site-packages/urlscan/urlchoose.py", line 132, in __init__
    shorten=self.shorten)
  File "/usr/lib64/python2.7/site-packages/urlscan/urlchoose.py", line 120, in process_urls
    items.append(urwid.Columns(markup))
  File "/usr/lib64/python2.7/site-packages/urwid/container.py", line 1095, in __init__
    raise ColumnsError, "widget list item invalid: %r" % (w,)
urwid.container.ColumnsError: widget list item invalid: (6, <Text flow widget b'[1] '>)

and ask you what I can do to assist in troubleshooting.

I'm using urwid-1.0.3 and urlscan installed from pip

firecat53 commented 6 years ago

You need urwid version >= 1.2.1 for it to function correctly. 1.0.3 is pretty old! What distro are you using? You might have to check the urwid site for instructions on manually installing a newer version.

Edit: Sorry, urwid>=1.2.1 is required for Python 3 support. 1.0.3 should work for Python 2. Which version of Python are you using?

hymie0 commented 6 years ago

Python 2.7.11

firecat53 commented 6 years ago

Hmmm.

Is it possible for you to upgrade the urwid version and see if that works? I haven't tested urlscan with python 2 for a long time now, so it's possible that with newer versions it also requires the newer urwid.

If that doesn't work, can you save this text into a file and then run urlscan <filename> and post the result?

Bad!
[My Link](<http://example.com/test(1)>)
with [parens at end](http://example.com/test(1))
http://example.com/test_(test)

Good!
[Watson](http://tailordev.github.io/Watson/)
with [parens](http://example.com/test(1).html)
http://example.com/test(1).html
http://msdn.microsoft.com/en-us/library/aa752574(VS.85).aspx

Thanks!

firecat53 commented 6 years ago

I tested urlscan with python 2.7.12, and it required a minimum urwid version of 1.1.0. I'm going to update the package to require a minimum of 1.2.1 so it works for both python 2 and 3 without any issues. If you have trouble with your distro only having the older 1.0.3 version, you can pip install --user urwid to get the correct version in your local user environment. Let me know if that doesn't work and we can try some other ideas.

Edit: I also just updated the Pypi version to 0.8.7, which includes this update and should pull in the correct dependency if you just pip install --user urlscan.

firecat53 commented 6 years ago

@hymie0 did you get this resolved?