Problem in managerClientConsole
Closed this issue · 5 comments
in trying to run the managerClienConsole.py I get the following error message:
urwid.widget.WidgetError: Cannot pack (maxcol,) size, this is not a flow widget;
To add some more information here is the complete log of the error:
Traceback (most recent call last):
File "./alertRclient.py", line 377, in
globalData.console.startConsole()
File "/home/pi/alertR/managerClientConsole/lib/screen.py", line 1736, in startConsole
loop.run()
File "/usr/lib/python2.7/dist-packages/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/usr/lib/python2.7/dist-packages/urwid/raw_display.py", line 237, in run_wrapper
return fn()
File "/usr/lib/python2.7/dist-packages/urwid/main_loop.py", line 285, in _run
self.draw_screen()
File "/usr/lib/python2.7/dist-packages/urwid/main_loop.py", line 508, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 596, in render
focus and self.focus_part == 'body')
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 132, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/decoration.py", line 722, in render
top, bottom = self.filler_values(size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/decoration.py", line 709, in filler_values
height = self._original_widget.rows((maxcol,),focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1369, in rows
focus = focus and self.focus_col == i ) )
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 924, in rows
return sum(self.get_item_rows(size, focus))
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 815, in get_item_rows
and self.focus_item == w))
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 924, in rows
return sum(self.get_item_rows(size, focus))
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 815, in get_item_rows
and self.focus_item == w))
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1369, in rows
focus = focus and self.focus_col == i ) )
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 924, in rows
return sum(self.get_item_rows(size, focus))
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 815, in get_item_rows
and self.focus_item == w))
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 242, in rows
return d.rows(size, focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/decoration.py", line 583, in rows
return self._original_widget.rows((maxcol-left-right,), focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/container.py", line 1369, in rows
focus = focus and self.focus_col == i ) )
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 192, in cached_rows
return fn(self, size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/decoration.py", line 575, in rows
left, right = self.padding_values(size, focus)
File "/usr/lib/python2.7/dist-packages/urwid/decoration.py", line 562, in padding_values
focus=focus)
File "/usr/lib/python2.7/dist-packages/urwid/widget.py", line 247, in pack
' flow widget: %s' % repr(self))
urwid.widget.WidgetError: Cannot pack (maxcol,) size, this is not a flow widget:
Can you tell me which urwid version you are using? I use 1.1.1 from the ubuntu 14.04 repositories and it works fine.
I have installed python-urwid in my raspberry Pi and the version should be 1.0.1-2 (as returned by aptitude version python-urwid).
Update.
I've successfully run the managerClientConsole in an Ubuntu system with a urwid version 1.1.1-1build2 installed. Probably the 1.0.1 of the Raspberry is not compatible. I tried to install the last urwid version for the Rapberry from the urwid website but the resulting version was still the 1.0.1 one.
I just tested it on my Raspberry Pi too and I got the same error as you. Try the following:
-remove the packet (apt-get --purge remove python-urwid)
-install pip if you do not have it already installed (apt-get install python-pip)
-install urwid via pip (pip install urwid)
I did it on my Raspberry Pi and it worked.