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

Double parantheses: "((.venv) )" #23193

Closed
Justin08784 opened this issue Apr 7, 2024 · 8 comments · Fixed by #23201
Closed

Double parantheses: "((.venv) )" #23193

Justin08784 opened this issue Apr 7, 2024 · 8 comments · Fixed by #23201
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@Justin08784
Copy link

Justin08784 commented Apr 7, 2024

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:

  1. Create workspace directory and venv
mkdir new_dir
cd new_dir
python3.12 -m venv .venv
  1. Open new_dir as a workspace
code .
  1. Run command:
    "Python: Select Interpreter" >> "Python 3.12.2 ('.venv': venv) ./.venv/bin/python"

  2. open vscode zsh instance
    ctrl + `

Diagnostic data

launch.json configuration

XXX

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Output for Python Debugger in the Output panel (ViewOutput, 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

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 7, 2024
@martinezhermes
Copy link

Very annoying bug, wasted almost an hour trying to debug my zshrc file

@smartVVI
Copy link

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

HeskethGD commented 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 deactivate did not work. Typing source deactivate then source .venv/bin/activate resolves 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
Copy link

HenryObj commented Apr 8, 2024

Same here. Mac M1 Pro - Sonoma. VS Code Version: 1.88.0 (Universal). zsh.

FYI:

  • Everything is fine in the activate script.
  • Deleting and re-installing the venv doesn't solve the issue.
  • Launching VS code with code repo/path or directly "open folder" leads to the same issue.

Hopefully, VS Code will publish a fix soon, and people won't waste too much time with it.

@ryanlong1004
Copy link

ryanlong1004 commented Apr 8, 2024

Same here.

image

Deactived with 'source deactivate' as mentioned above and got grep error.

image

@anthonykim1 anthonykim1 added area-terminal and removed triage-needed Needs assignment to the proper sub-team labels Apr 8, 2024
@anthonykim1
Copy link

Hello everyone, thank you for filing the issue.
Fix is on the way: #23201

anthonykim1 added a commit that referenced this issue Apr 8, 2024
Resolves: #23193 #23184

Resolve duplicated (.venv) prompt for users terminal.
Issue came from: #23080
@karthiknadig karthiknadig added this to the April 2024 milestone Apr 8, 2024
@karthiknadig karthiknadig added the bug Issue identified by VS Code Team member as probable bug label Apr 8, 2024
anthonykim1 added a commit to anthonykim1/vscode-python that referenced this issue Apr 9, 2024
Resolves: microsoft#23193 microsoft#23184

Resolve duplicated (.venv) prompt for users terminal.
Issue came from: microsoft#23080
karthiknadig pushed a commit that referenced this issue Apr 9, 2024
Resolves: #23193 #23184

Resolve duplicated (.venv) prompt for users terminal.
Issue came from: #23080
@aiday-mar aiday-mar added the verified Verification succeeded label Apr 24, 2024
@anthonykim1
Copy link

anthonykim1 commented May 7, 2024

This should've been resolved via: #23201
Thanks @starball5 for leaving a comment in the stackoverflow post!

wesm pushed a commit to posit-dev/positron that referenced this issue May 10, 2024
seeM pushed a commit to posit-dev/positron that referenced this issue May 12, 2024
wesm pushed a commit to posit-dev/positron that referenced this issue May 13, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
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 verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

11 participants