#934607 pudb/buster crashes if "m" is pressed --> Use manual backport

#934607#5
Date:
2019-08-12 12:25:20 UTC
From:
To:
I think providing backport or leaving this bug report should help people
using buster/stable ;-)

Problem:   pudb crash if "m" is pressed.

Solution:  Install the newer 2019.1-2 python3-pudb package from the bullseye repo.

   $ sudo dpkg -i python3-pudb_2019.1-2_all.deb

   It was fixed in upstream.  Considering the severe functionality problem, you may
   think about updating this program.  For most use, just work around
   problem using manual backport as above.

How to reproduce this bug:

Press "m" in pudb on buster --> Crash as follows:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pudb/__init__.py", line 119, in runscript
    dbg._runscript(mainpyfile)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 457, in _runscript
    self.run(statement, globals=globals_, locals=locals_)
  File "/usr/lib/python3.7/bdb.py", line 585, in run
    exec(cmd, globals, locals)
  File "<string>", line 1, in <module>
  File "/usr/bin/sphinx-build", line 3, in <module>
    __requires__ = 'Sphinx==1.8.4'
  File "/usr/bin/sphinx-build", line 3, in <module>
    __requires__ = 'Sphinx==1.8.4'
  File "/usr/lib/python3.7/bdb.py", line 88, in trace_dispatch
    return self.dispatch_line(frame)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 187, in dispatch_line
    self.user_line(frame)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 408, in user_line
    self.interaction(frame)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 376, in interaction
    show_exc_dialog=show_exc_dialog)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 2118, in call_with_ui
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 2362, in interaction
    self.event_loop()
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 2328, in event_loop
    toplevel.keypress(self.size, k)
  File "/usr/lib/python3/dist-packages/pudb/ui_tools.py", line 106, in keypress
    result = self._w.keypress(size, key)
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 1131, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 2271, in keypress
    key = w.keypress((mc,) + size[1:], key)
  File "/usr/lib/python3/dist-packages/urwid/container.py", line 1590, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib/python3/dist-packages/pudb/ui_tools.py", line 111, in keypress
    return handler(self, size, key)
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 1355, in pick_module
    build_filtered_mod_list(filt_edit.get_edit_text()))
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 1319, in build_filtered_mod_list
    for name, mod in list(sys.modules.items())
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 1320, in <genexpr>
    if mod_exists(mod))
  File "/usr/lib/python3/dist-packages/pudb/debugger.py", line 1301, in mod_exists
    base, ext = splitext(filename)
  File "/usr/lib/python3.7/posixpath.py", line 122, in splitext
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Please also see:
https://github.com/inducer/pudb/issues/327

#934607#10
Date:
2026-07-12 15:21:52 UTC
From:
To:
Control: fixed 934607 2025.1.5-0.1
Control: close 934607

This was reported against pudb 2018.1-1 as shipped in Debian 10 (buster)
and is tagged accordingly. buster has since reached end of life,
including LTS, so the buster-specific crash will not be fixed there.

There have been no recurrence reports against any later release in the
years since, and the current pudb in unstable is 2025.1.5. Closing this
bug; the buster version it was filed against is no longer supported.

If the crash is still reproducible on a supported release, please reopen
with details (pudb version and steps) and I will investigate.

Regards,