Public bug reported:

Try to debug even a simple Python script with

    pudb <script.py>

It fails with
```
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pudb/__init__.py", line 122, in runscript
    dbg = _get_debugger(
        steal_output=steal_output,
        _continue_at_start=_continue_at_start,
    )
  File "/usr/lib/python3/dist-packages/pudb/__init__.py", line 82, in 
_get_debugger
    from pudb.debugger import Debugger
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 584, in <module>
    from pudb.ui_tools import (
    ...<7 lines>...
    )
  File "/usr/lib/python3/dist-packages/pudb/ui_tools.py", line 143, in <module>
    class StackFrame(urwid.FlowWidget):
                     ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urwid/__init__.py", line 356, in 
__getattr__
    raise AttributeError(f"{name} not found in {__package__}")
AttributeError: FlowWidget not found in urwid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pudb", line 8, in <module>
    sys.exit(main())
             ~~~~^^
  File "/usr/lib/python3/dist-packages/pudb/run.py", line 108, in main
    runscript(mainpyfile, **options_kwargs)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pudb/__init__.py", line 128, in runscript
    dbg.__del__()
    ^^^
UnboundLocalError: cannot access local variable 'dbg' where it is not 
associated with a value
```

I'm using Resolute 26.04. The packaged version of python3-pudb is
2024.1.3-1. That version still uses `urwid.FlowWidget` that was
deprecated, and was later removed completely: the packaged version of
python3-urwid is 3.0.4-1 that doesn't have it.

Note that the upstream release 2025-1 of pudb [has been
fixed](https://github.com/inducer/pudb/commit/15b8d1a03afdb6e916a58121a77c0434f9c3954e)
not to depend on `urwid.FlowWidget`

** Affects: pudb (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  pudb won't start on Ubuntu because it depends on old urwid

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pudb/+bug/2171326/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to