python spyder debugger crashes - python

I am having this really annoying problem: when I try to debug in Spyder, the whole program gets stuck and I have to abort it. Yesterday it was working completely fine.
Any idea on how to fix it?
Thank you!

Related

Python stops responding when I run cv2.VideoCapture()

My question is pretty simple. When I run a this piece of code, be it in VSCode, Terminal or Idle, Python stops responding. I can't find a solution for this anywhere.
cap = cv2.VideoCapture(0)
Does anyone know why this happens?
EDIT: People are saying that this code probably isn't the issue. I know that it is, as I ran it in the shell alone and got the exact same issue.
More info: I am on MacOS Big Sur Beta 4.

F-string error in python when running on vs code

I need help in solving this problem. The screenshot below is of the code line which is giving error. It involves f-string and I am using python 3.7.6 base:conda.
This is the error message that I am getting.
This is the interpreter I am using.
Please help me solve it. Thank you.
So this issue was based on a VS Code extension that I was using to run my code. It was 'Code Runner'.
Two things need to be done:
Change this in setting.json
code-runner.executorMap": {"python":"$pythonPath $fullFileName"}
Check "run in terminal" in settings for 'code-runner'.
If you are switching virtualenv in VSCode you have to quit from opened terminal (on linux ctrl-d) and launch it again. Interpreter is not going to change without so.
This apply only to VSCode terminal obviously. And I have no idea if this is only on Linux or on other platforms too.
Hi Even i was getting the same issue see the below screenshot and and make some changes in settings.json and launch.json and then refresh it, everything will be working fine.

pyscripter crashing on startup

I've been using PyScripter for a few months now with no issue, but when I tried to open the application today it's just been crashing with the error message
"PyScripter has stopped working: A problem caused the program to stop
working correctly. Please close the program."
I'm unsure what is causing the error and so far I've been unable to fix it.
I don't believe I did anything the last time I used PyScripter which might have caused it to break.

Python Job Not Ending

I've had a strange occurance. I stopped a python script manually, but its still running. It shows it as stopped in my IDE (Spyder) but I can see it's still running in task manager. I also know it still processing because its still outputting files to a directory.
Does anyone know why this is happening and how I can prevent it on a go forward?
Got it, i needed to add Exception to my except statement. Thanks gerosalesc and Dot_Py for your help.
Try/Except in Python: How do you properly ignore Exceptions?

Python - I can't see my what my error is because the window disappears immediately

I am pretty new to Python and I have been pretty annoyed with this problem. I am not sure if this matters, but I run my .py file with Python 2.7.6 with python installed on my computer, not using it on any online thing or other program. Every time I come across an error, my program works fine until it comes to the error, but the window disappears right before I can possibly read whatever the error said it was... Anyways, I haven't been able to find out what is wrong with my programming, and I am tired of guessing and guessing what is wrong. How can I extend the time so I can read the error message? Or something like that? Thanks
You should run it from command window/terminal instead of double clicking on the file.
Yes, as #shortfellow said, running it from the terminal should work:
python your_file.py
Another tip that helps in Python, if you are having a hard time with errors, is to use iPython for debugging/testing code on the spot. You can give it a try.
http://ipython.org/

Categories