[Bug 2058388] [NEW] urwid 2.6.4-1 exception when drawing an empty Pile or Columns

Olivier Gayot 2058388 at bugs.launchpad.net
Tue Mar 19 13:29:49 UTC 2024


Public bug reported:

When attempting to draw an empty Pile or Columns using urwid 2.6.4-1, it
fails with the following exception:

  File "urwid/event_loop/main_loop.py", line 672, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/popup.py", line 127, in render
    self._update_overlay(size, focus)
  File "urwid/widget/popup.py", line 100, in _update_overlay
    canv = self._original_widget.render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 711, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/attr_map.py", line 158, in render
    canv = self._original_widget.render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/pile.py", line 829, in render
    canv = w.render(w_size, focus=focus and item_focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 711, in render
    canv = get_delegate(self).render(size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/padding.py", line 330, in render
    canv = self._original_widget.render((maxcol,) + size[1:], focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/widget.py", line 112, in cached_render
    canv = fn(self, size, focus=focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/pile.py", line 822, in render
    _widths, heights, size_args = self.get_rows_sizes(size, focus)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/pile.py", line 730, in get_rows_sizes
    heights.append(w.pack(w_h_arg, item_focus)[1])
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "urwid/widget/padding.py", line 276, in pack
    return super().pack(size, focus)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "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: <Padding widget <FocusTrackingPile widget> align=<Align.CENTER: 'center'> min_width=14 width=14>

There is an upstream fix [1] that is released in urwid 2.6.5.

 https://github.com/urwid/urwid/pull/843

** Affects: subiquity
     Importance: Undecided
         Status: Invalid

** Affects: urwid (Ubuntu)
     Importance: Undecided
     Assignee: Olivier Gayot (ogayot)
         Status: In Progress

** Also affects: subiquity
   Importance: Undecided
       Status: New

** Changed in: subiquity
       Status: New => Invalid

** Changed in: urwid (Ubuntu)
     Assignee: (unassigned) => Olivier Gayot (ogayot)

** Changed in: urwid (Ubuntu)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to urwid in Ubuntu.
https://bugs.launchpad.net/bugs/2058388

Title:
  urwid 2.6.4-1 exception when drawing an empty Pile or Columns

Status in subiquity:
  Invalid
Status in urwid package in Ubuntu:
  In Progress

Bug description:
  When attempting to draw an empty Pile or Columns using urwid 2.6.4-1,
  it fails with the following exception:

    File "urwid/event_loop/main_loop.py", line 672, in draw_screen
      canvas = self._topmost_widget.render(self.screen_size, focus=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/popup.py", line 127, in render
      self._update_overlay(size, focus)
    File "urwid/widget/popup.py", line 100, in _update_overlay
      canv = self._original_widget.render(size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 711, in render
      canv = get_delegate(self).render(size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/attr_map.py", line 158, in render
      canv = self._original_widget.render(size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/pile.py", line 829, in render
      canv = w.render(w_size, focus=focus and item_focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 711, in render
      canv = get_delegate(self).render(size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/padding.py", line 330, in render
      canv = self._original_widget.render((maxcol,) + size[1:], focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/widget.py", line 112, in cached_render
      canv = fn(self, size, focus=focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/pile.py", line 822, in render
      _widths, heights, size_args = self.get_rows_sizes(size, focus)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/pile.py", line 730, in get_rows_sizes
      heights.append(w.pack(w_h_arg, item_focus)[1])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "urwid/widget/padding.py", line 276, in pack
      return super().pack(size, focus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "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: <Padding widget <FocusTrackingPile widget> align=<Align.CENTER: 'center'> min_width=14 width=14>

  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-openstack-bugs mailing list