Skip to content

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

Closed

Description

@Justin08784

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 (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

Activity

  1. martinezhermes commented on Apr 7, 2024

    @martinezhermes

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

  2. smartVVI commented on Apr 8, 2024

    @smartVVI

    Looks like this issue is just not specific to zsh terminal instance, I am using bash termial and could still see this issue.

  3. HeskethGD commented on Apr 8, 2024

    @HeskethGD

    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.

  4. HenryObj commented on Apr 8, 2024

    @HenryObj

    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.

  5. ryanlong1004 commented on Apr 8, 2024

    @ryanlong1004

    Same here.

    image

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

    image

  6. anthonykim1 commented on Apr 8, 2024

    @anthonykim1

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

  7. added a commit that references this issue on Apr 8, 2024
    eed0c3b
  8. added a commit that references this issue on Apr 9, 2024
    42dc656
  9. added a commit that references this issue on Apr 9, 2024
    1d7c764
  10. anthonykim1 commented on May 7, 2024

    @anthonykim1

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

  11. added a commit that references this issue on May 10, 2024
    df9fce8
  12. added a commit that references this issue on May 12, 2024
    fdfb9f4
  13. added a commit that references this issue on May 13, 2024
    8c1e20e
  14. locked as resolved and limited conversation to collaborators on Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-terminalbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions