[Urwid] [bugreport] container.py

Patrick Totzke patricktotzke at googlemail.com
Sun Dec 11 14:48:59 EST 2011


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
    self.process_input(keys)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 447, in process_input
    k = self._topmost_widget.keypress(self.screen_size, k)
  File "/usr/local/lib/python2.7/dist-packages/alot/ui.py", line 56, in keypress
    return self._w.keypress(size, key)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/container.py", line 641, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/local/lib/python2.7/dist-packages/alot/buffers.py", line 32, in keypress
    return self.body.keypress(size, key)
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 767, in keypress
    return self._keypress_up((maxcol, maxrow))
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 829, in _keypress_up
    row_offset, 'below')
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 691, in change_focus
    if target.move_cursor_to_coords((maxcol,),pref_col,row):
  File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/container.py", line 1002, in move_cursor_to_coords
    if not w.selectable():
UnboundLocalError: local variable 'w' referenced before assignment




More information about the Urwid mailing list