Repository navigation
Double parantheses: "((.venv) )" #23193
Copy link
Copy link
Closed
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverifiedVerification succeededVerification succeeded
Milestone
Description
Type: Bug
Behaviour
When I run command "Python: Select Interpreter" on a ".venv" file inside a workspace, and open a new vscode terminal instance (zsh) in that workspace, then the first line of the terminal appears with "((.venv) )" instead of "(.venv)" prepended.
Steps to reproduce:
- Create workspace directory and venv
mkdir new_dir
cd new_dir
python3.12 -m venv .venv
- Open new_dir as a workspace
code .
-
Run command:
"Python: Select Interpreter" >> "Python 3.12.2 ('.venv': venv) ./.venv/bin/python" -
open vscode zsh instance
ctrl + `
Diagnostic data
launch.json configuration
XXX
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Output for Python Debugger in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python Debugger)
XXX
Extension version: 2024.4.0
VS Code version: Code 1.88.0 (Universal) (5c3e652f63e798a5ac2f31ffd0d863669328dc4c, 2024-04-03T13:28:18.899Z)
OS version: Darwin arm64 22.5.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 (8 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on 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 skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 3, 3, 3 |
| Memory (System) | 16.00GB (0.05GB free) |
| Process Argv | --crash-reporter-id 1e32f9d7-4252-4c45-908b-fbc466c4dabf |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp1r6:30993540
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
g1icg217:30999571
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-terminalbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugverifiedVerification succeededVerification succeeded
Activity
martinezhermes commentedon Apr 7, 2024
Very annoying bug, wasted almost an hour trying to debug my zshrc file
smartVVI commentedon Apr 8, 2024
Looks like this issue is just not specific to zsh terminal instance, I am using bash termial and could still see this issue.
HeskethGD commentedon Apr 8, 2024
Yeah think this may be a bug VS code has introduced recently. I have seen it on various machines. What was most annoying was that typing
deactivatedid not work. Typingsource deactivatethensource .venv/bin/activateresolves it for me but have to do it every time. Happens every time I open a new window or terminal in VS code. I'm on Mac.HenryObj commentedon Apr 8, 2024
Same here. Mac M1 Pro - Sonoma. VS Code Version: 1.88.0 (Universal). zsh.
FYI:
Hopefully, VS Code will publish a fix soon, and people won't waste too much time with it.
ryanlong1004 commentedon Apr 8, 2024
Same here.
Deactived with 'source deactivate' as mentioned above and got grep error.
anthonykim1 commentedon Apr 8, 2024
Hello everyone, thank you for filing the issue.
Fix is on the way: #23201
Fix duplicated venv prompt (#23201)
Fix duplicated venv prompt (microsoft#23201)
Fix duplicated `.venv` prompt parenthesis (#23206)
starball5 commentedon May 4, 2024
Related on Stack Overflow: Why are there double parentheses around my Python virtual environment in Visual Studio Code v1.88.0 and Python extension v2024.4.0?
anthonykim1 commentedon May 7, 2024
This should've been resolved via: #23201
Thanks starball (@starball5) for leaving a comment in the stackoverflow post!
Fix duplicated venv prompt (microsoft/vscode-python#23201)
Fix duplicated venv prompt (microsoft/vscode-python#23201)
Fix duplicated venv prompt (microsoft/vscode-python#23201)