-
Notifications
You must be signed in to change notification settings - Fork 52
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
Multiple 'n' after exception takes to py IPython core, threading and logging library paths and results in TypeError #216
Comments
I tried to triage this last week, but seems like pyflyby's debugger requires (pyflyby) $ python a.py & [0/269]
[1] 87930
(pyflyby) $ py -d 87930
Traceback (most recent call last):
File "/Users/aktech/miniconda3/envs/pyflyby/bin/py", line 33, in <module>
sys.exit(load_entry_point('pyflyby', 'console_scripts', 'py')())
File "/Users/aktech/quansight/pyflyby/lib/python/pyflyby/_py.py", line 2052, in py_main
_PyMain(args).run()
File "/Users/aktech/quansight/pyflyby/lib/python/pyflyby/_py.py", line 1787, in run
self._run_action()
File "/Users/aktech/quansight/pyflyby/lib/python/pyflyby/_py.py", line 1989, in _run_action
attach_debugger(int(arg0, 10))
File "/Users/aktech/quansight/pyflyby/lib/python/pyflyby/_dbg.py", line 1201, in attach_debugger
gdb_pid = inject(pid, statements=";".join(statements), wait=False)
File "/Users/aktech/quansight/pyflyby/lib/python/pyflyby/_dbg.py", line 1052, in inject
process = subprocess.Popen(command,
File "/Users/aktech/miniconda3/envs/pyflyby/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/aktech/miniconda3/envs/pyflyby/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gdb' |
I tried reproducing on ubuntu 18.04, I get the following: (pyflyby) $ python a.py &
[1] 119278
(pyflyby) $ py -d 119278
Traceback (most recent call last):
File "/home/aktech/work/pyflyby/foo.py", line 7, in <module>
raise TimeoutError("FAILE")
TimeoutError: FAILE
[1] + 112745 exit 1 python foo.py
Debugging complete.
[1]+ Exit 1 python a.py
(pyflyby) $ |
Tried with Ubuntu 22.04 as well, same result: (venv) $ python a.py &
[1] 22701
(venv) $ py -d 22701
Traceback (most recent call last):
File "/root/pyflyby/a.py", line 7, in <module>
raise TimeoutError("FAILE")
TimeoutError: FAILE
Debugging complete.
[1]+ Exit 1 python a.py GDB Version: (venv) $ gdb --version
GNU gdb (Ubuntu 12.1-3ubuntu2) 12.1 |
@dshivashankar1994 Can you confirm you still see this issue in the latest master and with which OS/version and GDB version? |
I tried it and was able to reproduce.
|
I installed GDB 11.2 from here: https://sourceware.org/pub/gdb/releases/ and tried reproducing the issue, still the same results, I might be doing something wrong. When I run the command cc @sac111gp @dshivashankar1994 I have written the exact commands/steps I used for reproduction, can you spot the difference? Script(venv) $ cat a.py
import time
a=1
while True:
a += 1
time.sleep(1)
if a > 10:
raise TimeoutError("FAILE") Reproduction(venv) $ python a.py &
[1] 68317
(venv) $ py -d 68317
Traceback (most recent call last):
File "/root/pyflyby/a.py", line 7, in <module>
raise TimeoutError("FAILE")
TimeoutError: FAILE
Debugging complete.
[1]+ Exit 1 python a.py GDB Version(venv) $ gdb --version
GNU gdb (GDB) 11.2
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. OS Version
pyflyby version and latest commit(venv) $ py --version
pyflyby 1.8.4 (py)
(venv) root@ubuntu-s-4vcpu-8gb-amd-fra1-01:~/pyflyby# git log -1
commit 238edc28fb00160f385ad5807cbb536b6417c866 (HEAD -> master, tag: 1.8.4, origin/master, origin/HEAD)
Author: Swapnil Ojha <ojha@deshaw.com>
Date: Mon Apr 17 21:22:34 2023 +0530
Bump version 1.8.3 -> 1.8.4
(venv) root@ubuntu-s-4vcpu-8gb-amd-fra1-01:~/pyflyby# |
OS version
GDB version
pyflyby version - Also reproducible with master version
|
@dshivashankar1994 What terminal emulator are you using to test that and can you try another by any chance? |
@aktech First it seem my gdb is a bit stricter and I need to do some casting to make sure it works Recent gdb should also let you run Python code with |
Hey @Carreau can you share an example script of how that worked for you?
Did you wrote an extension or something? |
I was earlier using MATE terminal (xterm). Used GNOM (xterm) and the issue was still reproducible. |
Reproducer:
For debugger output, refer to the attached file
pyflyby output.txt
The text was updated successfully, but these errors were encountered: