[Bug 2058388] Re: urwid 2.6.4-1 exception when rendering an empty Pile or Columns as a flow widget
Olivier Gayot
2058388 at bugs.launchpad.net
Tue Mar 19 17:03:27 UTC 2024
** Patch added: "1-2.6.4-1__2.6.4-1ubuntu1.debdiff"
https://bugs.launchpad.net/debian/+source/urwid/+bug/2058388/+attachment/5757228/+files/1-2.6.4-1__2.6.4-1ubuntu1.debdiff
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2058388
Title:
urwid 2.6.4-1 exception when rendering an empty Pile or Columns as a
flow widget
Status in subiquity:
Invalid
Status in urwid package in Ubuntu:
In Progress
Status in urwid package in Debian:
Unknown
Bug description:
When attempting to render an empty Pile or Columns as a flow widget
using urwid 2.6.4-1, it fails with the following exception:
File "/usr/lib/python3/dist-packages/urwid/widget/widget.py", line 112, in cached_render
canv = fn(self, size, focus=focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urwid/widget/pile.py", line 822, in render
_widths, heights, size_args = self.get_rows_sizes(size, focus)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urwid/widget/pile.py", line 730, in get_rows_sizes
heights.append(w.pack(w_h_arg, item_focus)[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urwid/widget/pile.py", line 744, in pack
return super().pack(size, focus)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/urwid/widget/widget.py", line 401, in pack
raise WidgetError(f"Cannot pack (maxcol,) size, this is not a flow widget: {self!r}")
urwid.widget.widget.WidgetError: Cannot pack (maxcol,) size, this is not a flow widget: <Pile widget>
Minimal code to reproduce:
```python
from urwid import Pile
Pile([
("pack", Pile([])),
]).render((10,))
```
This looks like a regression in 2.6.4-1 since the same code was not
failing on 2.1.2-4
There is an upstream fix [1] that is released in urwid 2.6.5.
https://github.com/urwid/urwid/pull/843
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2058388/+subscriptions
More information about the Ubuntu-sponsors
mailing list