inducer / pudb

Full-screen console debugger for Python
https://documen.tician.de/pudb/
Other
3k stars 229 forks source link

fix: macOS PUDB_TTY "I/O operation on closed file." #638

Closed bukzor closed 4 months ago

bukzor commented 8 months ago

Don't close a file that's in use. Apparently linux is okay with this, but macos isn't?

Otherwise, I get this error:

Traceback (most recent call last):
  File ".../site-packages/pudb/debugger.py", line 2542, in call_with_ui
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File ".../site-packages/pudb/debugger.py", line 2865, in interaction
    self.event_loop()
  File ".../site-packages/pudb/debugger.py", line 2821, in event_loop
    self.screen.draw_screen(self.size, canvas)
  File ".../site-packages/urwid/display/_raw_display_base.py", line 582, in draw_screen
    self._setup_G1()
  File ".../site-packages/urwid/display/_raw_display_base.py", line 524, in _setup_G1
    self.write(escape.DESIGNATE_G1_SPECIAL)
  File ".../site-packages/urwid/display/_raw_display_base.py", line 220, in write
    self._term_output_file.write(data)
ValueError: I/O operation on closed file.
inducer commented 4 months ago

Superseded by #656.