Randomly, when I run in vscode a python script, I get this error message:
"Timed out waiting for debuggee to spawn"
It happens randomly, sometimes disappears when killing all vscode processes but sometimes it doesn't help.
My vscode version is:
and the debugger extension launcher is:
/homes/noyah/.vscode-server/extensions/ms-python.python-2022.19.13251009/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher
There are many possible reasons for this. You can try the following methods:
Right click vscode and set the administrator identity to run:
Check your Python version. If it is too old, this problem will occur.
Try using older python extensions or pre-release version:
Related
VSCode 1.71.0 on macOS 12.5.1 (Apple M1)
Python 3.10.6 in venv
I have a unittest setup, executed from within VSCode, which is running for much longer than it should (due to an inefficient algorithm in my code at present). The only way I can find to terminate the long-running task is to SIGTERM it thru top. The test is displayed as running in the Test Explorer, but it has no further control over the process
I'm looking for how I can do this via VSCode if possible. I have tried the following options:
Nothing available by right-click in the Test Explorer, just the start / debug options.
Ctrl-C in the Python test log output or in the Python output windows does nothing
Running as a debug session, with no breakpoints does at least offer me a stop button. Is this my best option, even though it brings the overhead of a debug session?
My fallback option is to run the tests from the CLI:
python -m unittest tests.test_file.TestMethods.test_1
where I can ctrl-c, but I'd like to be able to have the same control in the Test Explorer.
Seems my OP was a bit of a duplicate and I have missed the obvious. Thx to #rioV8 for the clue.
An answer to this question shows the stop button at the top of the Test Explorer that I had missed.
I am running my Python script using Pycharm on Mac.
The script is reading, processing and plotting some data.
When I place a debug point(often shortly after I plotted some charts), I encountered "python quit unexpectedly". My debugger logged:
"called Tcl_FindHashEntry on deleted table"
Would you please help? I want the program to stop at the debug point, instead of quitting.
Your error looks like its coming from the backend of MatPlotLib. Here is an open bug which references the same error. The bug may or may not be what you are experiencing, but has to do with window sizing and multiple screens.
As troubleshooting:
If multiple monitors or a dock are in use, try removing them from the equation.
Use Windows to examine breakpoint. (Bug appears Mac-specific.)
I am new to Python and recently installed Python 3.6 on Windows 10. When I try to open IDLE, Python's IDE, I keep getting a message saying that it can not establish a subprocess. I have tried uninstalling and installing several times. I have seen several forums which say that there could be a .py file that is in the directory that is messing up IDLE. This is not my case, as I have not even been able to start using Python and I do not have a firewall either. Can someone tell me how I can get IDLE to work?
In this answer I collected together 9 possible reasons for the message, as reported in various SO answers.
If you try to start IDLE from a command line (Command Prompt or PowerShell)
> python -m idlelib # idlelib.idle for 2.x
one might get a helpful error message.
I work with over 30 Python developers and without fail when this happens they were behind a proxy / vpn. Turn off your proxy / vpn and it will work. Must have had this happen hundreds of times and this solution always worked.
I can run my script once with each Python console ("Python 1, Python 2, etc"), but after running, the console is unusable - I can't run or type anything into the console and get a return. When I try run the script again I get a message -
"No Python console is currently selected to run GameLoop.py. Please select or open a new Python console and try again."
If I open a new console, I can run the script again. But the new console has no memory of the variables created in the script.
I don't think this problem occured the first 2 times using Spyder. My version is Spyder 2.3.8 and I am running Python 2.7.
My console settings are set to "Execute in current IPython or Python console", but changing this setting to "dedicated" doesn't help.
How can I a console to continue being usable after running a script?
I'm running a different version of Spyder & Python but was able to repro your issue. Make sure you always have an iPython console running, this will make sure you don't get this error. This will help even on re-opening spyder.
Go to uninstall programmes>click on pythonxx(xx is version)>repair>yes
after repair procedure completed,Idle works fine.
I use Spyder 2.3.5.2 on an Anaconda Python installation running on Windows 7 64 bit.
The debug functionalities are very temperamental and unreliable. My breakpoints are often completely ignored. Sometimes applying the IT approach (closing and restarting the program) solves the issue, but more often than not it doesn't.
Some forums recommend running the program in the current ipython console, but that doesn't help, either.
Is there anything I can do?
Thanks.
I could not get Sypder to stop at break points (inserted with f12). But then in reading the docs I realized I needed to switch to debug mode (Ctrl-f5 or Debug->Debug). This switches the IPython console prompt to:
ipdb>
Once in this mode, break statements work.