pazz/alot — Issue #127: urwid: calculate rows falsely?
Author: pazz
Created: 2011-11-13 12:07:54+00:00
State: open
Labels: bug

```
Traceback (most recent call last):
File "./bin/alot", line 20, in
main()
File "/usr/local/lib/python2.7/dist-packages/alot/init.py", line 119, in main
args.colours,
File "/usr/local/lib/python2.7/dist-packages/alot/ui.py", line 100, 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 1092, in _twisted_idle_callback
callback()
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 497, in entering_idle
self.draw_screen()
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/main_loop.py", line 508, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/widget.py", line 1318, in render
canv = get_delegate(self).render(size, focus=focus)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/container.py", line 596, in render
focus and self.focus_part == 'body')
File "/usr/local/lib/python2.7/dist-packages/alot/buffers.py", line 39, in render
return self.body.render(size, focus)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/widget.py", line 170, in finalize_render
canv = fn(self, size, focus=focus)
File "/usr/local/lib/python2.7/dist-packages/urwid-1.0.0-py2.7-linux-x86_64.egg/urwid/listbox.py", line 348, in render
raise ListBoxError, "Focus Widget %r at position %r within listbox calculated %d rows but rendered %d!"% (focus_widget,focus_pos,focus_rows, focus_canvas.rows())
urwid.listbox.ListBoxError: Focus Widget at position 0 within listbox calculated 39 rows but rendered 38!
```