Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on maximize sidebar #677

Closed
martin-kokos opened this issue Feb 2, 2025 · 0 comments
Closed

Crash on maximize sidebar #677

martin-kokos opened this issue Feb 2, 2025 · 0 comments
Labels

Comments

@martin-kokos
Copy link

martin-kokos commented Feb 2, 2025

Describe the bug
Maximizing the right column causes a crash

To Reproduce
Steps to reproduce the behavior:

  1. Run debugger
  2. Focus Variables with V
  3. Press =
  4. Get traceback popup

Expected behavior
Work

Screenshots
NA

Additional context
NA

Versions

python-3.12
pudb-2024.1.3
urwid-2.6.16

Traceback

python version: 3.12.8 (main, Jan 19 2025, 09:22:33) [GCC 14.2.1 20241221]
pudb version: 2024.1.3
urwid version: 2...6...1.6
Traceback (most recent call last):
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/columns.py", line 351, in _validate_contents_modified
    _w, (t, n, b) = item
        ^^^^^^^^^
ValueError: not enough values to unpack (expected 3, got 2)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/pudb/debugger.py", line 2863, in event_loop
    toplevel.keypress(self.size, k)
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/pudb/ui_tools.py", line 131, in keypress
    result = self._w.keypress(size, key)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/frame.py", line 526, in keypress
    return self.body.keypress((maxcol, remaining), key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/widget.py", line 729, in keypress
    return get_delegate(self).keypress(size, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/columns.py", line 1216, in keypress
    key = w.keypress(size_args[i], key)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/pudb/ui_tools.py", line 136, in keypress
    return handler(self, size, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/pudb/debugger.py", line 2046, in min_sidebar
    self.columns.contents[1] = (
    ~~~~~~~~~~~~~~~~~~~~~^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/monitored_list.py", line 429, in __setitem__
    focus = self._adjust_focus_on_contents_modified(slice(i, i + 1 or None), [y])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/monitored_list.py", line 333, in _adjust_focus_on_contents_modified
    focus = self._validate_contents_modified(indices, new_items)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/columns.py", line 361, in _validate_contents_modified
    raise ColumnsError(f"added content invalid {exc}").with_traceback(exc.__traceback__) from exc
  File "/home/x/repos/torchmetrics/venv/lib/python3.12/site-packages/urwid/widget/columns.py", line 351, in _validate_contents_modified
    _w, (t, n, b) = item
        ^^^^^^^^^
urwid.widget.columns.ColumnsError: added content invalid not enough values to unpack (expected 3, got 2)
@martin-kokos martin-kokos changed the title Crash on column resize Crash on maximize sidebar Feb 2, 2025
@inducer inducer closed this as completed Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants