Patrick Totzke | 11 Dec 2011 20:48

[bugreport] container.py

Hi, I just got an uncaught UnboundLocalError from container.py:
best,
/p

Traceback (most recent call last):
  File "/usr/local/bin/alot", line 20, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/alot/init.py", line 101, in main
    args.colours,
  File "/usr/local/lib/python2.7/dist-packages/alot/ui.py", line 111, in __init__
    self.mainloop.run()
  File
"/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py",
line 274, in run
    self.screen.run_wrapper(self._run)
  File
"/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/raw_display.py",
line 229, in run_wrapper
    return fn()
  File
"/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py",
line 307, in _run
    self.event_loop.run()
  File
"/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py",
line 1159, in wrapper
    rval = f(*args,**kargs)
  File
"/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py",
line 358, in _update
(Continue reading)

Ian Ward | 11 Dec 2011 20:58
Favicon
Gravatar

Re: [bugreport] container.py

Patrick Totzke wrote on 2011-12-11 14:48:
> Hi, I just got an uncaught UnboundLocalError from container.py:
> best,
> /p

Interesting.

So it looks like you have a Pile that contains no widgets, and yet
move_cursor_to_coords is still being called on it, like it's about to
take the focus.  I guess that could happen if your ListBox has no
selectable widgets in it, but I'm wondering if there will be other
problems with having a 0-height focus widget.

try adding:

    else: return False

after the for loop, container.py line 1001.  And let me know if things
continue on any further for you.

Ian

Gmane