Skip to content

Instantly share code, notes, and snippets.

@pazz
Last active December 15, 2015 00:29
Show Gist options
  • Select an option

  • Save pazz/5173476 to your computer and use it in GitHub Desktop.

Select an option

Save pazz/5173476 to your computer and use it in GitHub Desktop.
trace i see when overwriting WidgetWrap.render
with
```
def render(size, focus=False):
return urwid.WidgetWrap.render(size, focus=focus)
```
-----------------------------------------------
File "/home/pazz/.local/lib/python2.7/site-packages/alot/buffers.py", line 37, in render
return self.body.render(size, focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/widget.py", line 1751, in render
canv = get_delegate(self).render(size, focus=focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/listbox.py", line 475, in render
focus_canvas = focus_widget.render((maxcol,), focus=focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/container.py", line 2055, in render
focus = focus and self.focus_position == i)
File "/home/pazz/.local/lib/python2.7/site-packages/urwid-1.2.0_dev-py2.7-linux-x86_64.egg/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
TypeError: render() got multiple values for keyword argument 'focus'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment