You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
run selection/line in python terminal not working #21419
I have a similar issue:
when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals named Python, where the first one opens the python terminal (PID 29056) but the second (PID 434444) does not. After that, it tries to execute the highlighted code in the second terminal which obviously is yielding an error.
If I kill the second Python terminal (PID 434444) and try to run a line of Python again, it opens a new terminal with a new PID and no Python console and behaves exactly like the second one.
If I kill the first terminal and then run the line it does not create another console, but still not running the code.
Finally, if I type python in the second console it opens the python terminal, and if I start running line-by-line execution it works.
Reacted by Marko Novitović, luis0283, Aidan L, Fábio Patroni and sacordovaLBNL
I have a similar issue: when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals named Python, where the first one opens the python terminal (PID 29056) but the second (PID 434444) does not. After that, it tries to execute the highlighted code in the second terminal which obviously is yielding an error. If I kill the second Python terminal (PID 434444) and try to run a line of Python again, it opens a new terminal with a new PID and no Python console and behaves exactly like the second one. If I kill the first terminal and then run the line it does not create another console, but still not running the code. Finally, if I type python in the second console it opens the python terminal, and if I start running line-by-line execution it works.
The same thing happens to me since yesterday, thank you very much for the solution!!!, and I hope they fix it later.
Where did this bug suddenly come from? I don't remember installing any updates of VS Code. Does VS Code update automatically in the background? If so, why can't one go back to an older version, like with the extensions, if there is a serious bug like this that isn't being addressed? Makes me want to switch back to vim. 😡
Glad 1.77.3 worked! Also wanted to mention that you may need to change your default update settings under your profile settings to prevent auto updates.
Good point, I just reopened the program and it had automatically reinstalled 1.79.0 ... buuuut: the issue wasn't there 😮 So I checked and I still had the Python extension v2023.8.0 running. Apparently the bug is caused by v2023.10.0!
So downgrading the Python extension is the solution to the problem.
Reacted by Marko Novitović, Ayoub Aarab and illmattic-1
Good point, I just reopened the program and it had automaically reinstalled 1.79.0 ... buuuut: the issue wasn't there 😮 So I checked and I still had the Python extension v2023.8.0 running. Apparently the bug is caused by v2023.10.0!
So downgrading the Python extension is the solution to the problem.
I have tried this myself and can confirm the issue is caused by the v2023.10.0 of the Python VSCode extension. Downgrading to v2023.8.0 solves the issue.
Activity
pkoprov commentedon Jun 9, 2023
I have a similar issue:
when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals named Python, where the first one opens the python terminal (PID 29056) but the second (PID 434444) does not. After that, it tries to execute the highlighted code in the second terminal which obviously is yielding an error.
If I kill the second Python terminal (PID 434444) and try to run a line of Python again, it opens a new terminal with a new PID and no Python console and behaves exactly like the second one.
If I kill the first terminal and then run the line it does not create another console, but still not running the code.
Finally, if I type
pythonin the second console it opens the python terminal, and if I start running line-by-line execution it works.illmattic-1 commentedon Jun 9, 2023
I have the exact same issue.
Thank you for providing a work around
luis0283 commentedon Jun 9, 2023
The same thing happens to me since yesterday, thank you very much for the solution!!!, and I hope they fix it later.
Beenjamming commentedon Jun 9, 2023
Exact same issue. Workaround also works but didn't have the issue till yesterday.
VincentGurgul commentedon Jun 11, 2023
Where did this bug suddenly come from? I don't remember installing any updates of VS Code. Does VS Code update automatically in the background? If so, why can't one go back to an older version, like with the extensions, if there is a serious bug like this that isn't being addressed? Makes me want to switch back to vim. 😡
Beenjamming commentedon Jun 11, 2023
Vincent,
It is still open. I closed my issue as it was a duplicate and linked to this one. You can roll back VS code: https://code.visualstudio.com/updates/v1_78
I installed the April 2023 release and the issue is not present. You will also need to roll back the python extension. Hope this helps!
VincentGurgul commentedon Jun 11, 2023
Version 1.78.2 had the same bug for me (Mac silicon / arm64). Had to switch back to 1.77.3, now it is working again. Thanks a lot for the link.
Beenjamming commentedon Jun 11, 2023
Glad 1.77.3 worked! Also wanted to mention that you may need to change your default update settings under your profile settings to prevent auto updates.
VincentGurgul commentedon Jun 11, 2023
Good point, I just reopened the program and it had automatically reinstalled 1.79.0 ... buuuut: the issue wasn't there 😮 So I checked and I still had the Python extension v2023.8.0 running. Apparently the bug is caused by v2023.10.0!
So downgrading the Python extension is the solution to the problem.
AyoubAarab commentedon Jun 12, 2023
I have tried this myself and can confirm the issue is caused by the v2023.10.0 of the Python VSCode extension. Downgrading to v2023.8.0 solves the issue.
anthonykim1 commentedon Jun 13, 2023
Duplicate #21393