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

when I press SHIFT + ENTER, or right click selection -> Run Python -> run selection/line in the python terminal it opens 2 terminals #21393

Closed
pkoprov opened this issue Jun 9, 2023 · 16 comments
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority regression Bug didn't exist in a previous release verified Verification succeeded

Comments

@pkoprov
Copy link

pkoprov commented Jun 9, 2023

Type: Bug

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.

Extension version: 2023.10.0
VS Code version: Code 1.79.0 (b380da4ef1ee00e224a15c1d4d9793e27c2b6302, 2023-06-07T14:26:35.552Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz (8 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.61GB (4.01GB free)
Process Argv --crash-reporter-id d885eecb-5cf7-428f-a093-4ece42fa5348
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30730052
hidesbindicator:30760978
pythongtdpath:30739704
i26e3531:30763805
dh2dc718:30763024
pythonnosm12tcf:30757130

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 9, 2023
@lux5
Copy link

lux5 commented Jun 10, 2023

I have got the same issue after I upgraded to v2023.10.0.
When trying to run the selected codes by pressing Shift + Enter -> end up with two terminal windows open:

  1. The first terminal window just activates Python and no follow-up executing the selected codes.
  2. The second terminal is just the default terminal with those Python codes with no python environment.

Version: 1.79.0 (user setup)
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:26:35.552Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.18363

@Lauler
Copy link

Lauler commented Jun 10, 2023

Same issue on Linux/Ubuntu.

Version: 1.79.0
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:28:44.251Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.15.0-73-generic

@selgamal-telnyx
Copy link

same issue windows 11, reported here with all details

@KatlehoJordan
Copy link

KatlehoJordan commented Jun 11, 2023

same issue windows 11, reported here with all details

microsoft/vscode#184790 (comment)

As someone tipped you there, try rolling back to v2023.8.0 of the vscode-python extension.

Some bug appeared in the latest version, it seems.

@dirk2011
Copy link

Have this bug also.

Version: 1.79.0
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:28:44.251Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 5.4.0-150-generic

@chrigraf
Copy link

Same here:
Version: 1.79.0 (user setup)
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:26:35.552Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

@starball5
Copy link

starball5 commented Jun 11, 2023

Related on Stack Overflow:

If you have the privilege level to do so, help with closing duplicates would be appreciated, so the answers can be put in one place instead of scattered about.

@ctedja
Copy link

ctedja commented Jun 12, 2023

Was also facing this issue. Rolling back to v2023.8.0 seemed to help.

@Noath2302
Copy link

same issue for me, thank you @starball5, rolling back really helps

Version: 1.79.0 (user setup)
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:26:35.552Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

@IAmMalteC
Copy link

Same issue here. Rollback helps

Version: 1.79.0 (user setup)
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Datum: 2023-06-07T14:26:35.552Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
Betriebssystem: Windows_NT x64 10.0.19045

@smoudour
Copy link

Same issue here, Windows 10. Rolling back to v2023.8.0 seems to work.

@emillykkejensen
Copy link

Same here:
Version: 1.79.0 (user setup)
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:26:35.552Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621

@brettcannon
Copy link
Member

I just wanted to quickly apologize for the breakage! #21418 has been opened to revert this new terminal feature to fix this breakage. Unfortunately none of our pre-release users ran across this (been in main since May 10, so available in pre-release since May 11; obviously if anyone here is interested in using pre-release versions, more help is always appreciated 😁), and we seem to have a gap in our tests around this flow (which I have opened #21420 to fill that gap).

Our hope is to have a bugfix release out today or tomorrow depending on how the revert PR goes.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jun 13, 2023
@pkoprov
Copy link
Author

pkoprov commented Jun 13, 2023

@brettcannon I tried a prerelease version after 10 release, and it had the same problem, so I had to rollback to version 8.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jun 13, 2023
@KatlehoJordan
Copy link

I just wanted to quickly apologize for the breakage! #21418 has been opened to revert this new terminal feature to fix this breakage. Unfortunately none of our pre-release users ran across this (been in main since May 10, so available in pre-release since May 11; obviously if anyone here is interested in using pre-release versions, more help is always appreciated 😁), and we seem to have a gap in our tests around this flow (which I have opened #21420 to fill that gap).

Our hope is to have a bugfix release out today or tomorrow depending on how the revert PR goes.

I just wanted to say I accept your apology, 😉. I'm thankful to the open source community that builds software that all of the rest of us lurkers use daily without a second thought and we only come out of the woodwork to complain when something goes wrong. You developers are heros, even if you occasionally introduce bugs, 😝.

So really, I accept your apology, and rather I thank you for your efforts to maintain these amazing free resources for us all!

I'm looking forward to the fix, 😊.

@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority regression Bug didn't exist in a previous release needs PR Ready to be worked on area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Jun 13, 2023
@karthiknadig karthiknadig added this to the May 2023 Recovery 1 milestone Jun 13, 2023
@karthiknadig
Copy link
Member

This fix is out. Stable users v2023.10.1 (latest stable) and for insiders users it is v2023.11.11651007 (latest insiders)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 19, 2023
@DonJayamanne DonJayamanne added the verified Verification succeeded label Jul 26, 2023
@eleanorjboyd eleanorjboyd removed the needs PR Ready to be worked on label Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority regression Bug didn't exist in a previous release verified Verification succeeded
Projects
None yet
Development

No branches or pull requests