Skip to content
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

run selection/line in python terminal not working #21419

Closed
MarkoNovi opened this issue Jun 9, 2023 · 11 comments
Closed

run selection/line in python terminal not working #21419

MarkoNovi opened this issue Jun 9, 2023 · 11 comments
Assignees
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@MarkoNovi
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.79.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. select couple of lines in python file
  2. press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in python terminal

this started happening after last update.

@pkoprov
Copy link

pkoprov commented 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 python in the second console it opens the python terminal, and if I start running line-by-line execution it works.

@illmattic-1
Copy link

I have the exact same issue.

Thank you for providing a work around

@luis0283
Copy link

luis0283 commented 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 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.

@Beenjamming
Copy link

Exact same issue. Workaround also works but didn't have the issue till yesterday.

@VincentGurgul
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

VincentGurgul commented 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
Copy link

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.

@meganrogge meganrogge assigned karrtikr and unassigned meganrogge Jun 12, 2023
@anthonykim1 anthonykim1 transferred this issue from microsoft/vscode Jun 13, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 13, 2023
@anthonykim1
Copy link

Duplicate #21393

@anthonykim1 anthonykim1 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

10 participants