inducer / inducer/pudb

debug gentoo emerge with pudb error

Open
#454 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.2k
Forks
245
Avg merge
13m
Merged PRs (30d)
5

Description

i am debug gentoo linux emerge script with pudb.

in /usr/lib/python3.8/site-packages/_emerge/main.py, i add

```
from pudb import set_trace; set_trace(paused=False)

from pudb.lowlevel import setlogfile; setlogfile("/tmp/pudberrors.log")
```
and
```
gymDeskGentoo ~/.config/pudb # cat saved-breakpoints-3.8
b /usr/lib/python3.8/site-packages/portage/process.py:374
```

the debugging runs ok, and the emerging process can finished fine, except that near the end of the process, i get an exception screen, but the screen only destroyed the display, i can still work with the terminal window and type clear command the clear the terminal display

![image](https://user-images.githubusercontent.com/12045548/120879169-0f0af300-c5f4-11eb-99e3-32b99fb45055.png)

in /tmp/pudberrors.log, i can find what follows:

[*** Pudb UI Exception Encountered: Error while showing error dialog ***
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2378, in call_with_ui
return f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2657, in interaction
self.event_loop()
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2614, in event_loop
keys = self.screen.get_input()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 342, in get_input
self._wait_for_input_ready(self._next_timeout)
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 542, in _wait_for_input_ready
fd = self._input_fileno()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 98, in _input_fileno
return self._term_input_file.fileno()
ValueError: I/O operation on closed file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 443, in user_line
self.interaction(frame)
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 409, in interaction
self.ui.call_with_ui(self.ui.interaction, exc_tuple,
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2380, in call_with_ui
self.hide()
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2373, in hide
self.screen.stop()
File "/usr/lib/python3.8/site-packages/urwid/display_common.py", line 821, in stop
self._stop()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 255, in _stop
fd = self._input_fileno()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 98, in _input_fileno
return self._term_input_file.fileno()
ValueError: I/O operation on closed file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2292, in show_internal_exc_dlg
self._show_internal_exc_dlg(exc_tuple)
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2319, in _show_internal_exc_dlg
self._show_exception_dialog(
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2327, in _show_exception_dialog
res = self.dialog(
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2263, in dialog
return self.event_loop(w)[0]
File "/usr/lib/python3.8/site-packages/pudb/debugger.py", line 2614, in event_loop
keys = self.screen.get_input()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 342, in get_input
self._wait_for_input_ready(self._next_timeout)
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 542, in _wait_for_input_ready
fd = self._input_fileno()
File "/usr/lib/python3.8/site-packages/urwid/raw_display.py", line 98, in _input_fileno
return self._term_input_file.fileno()
ValueError: I/O operation on closed file](url)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.