Skip to content

File path with apostrophe + parentheses gets double-quoted when running via Run button / integrated terminal #2026

Open

Description

@alt-rajat-jain

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

  • VS Code Version: 1.145.0 (commit a717861c07586a53d83b80d742cd3f59b20a6273)
  • OS Version: macOS 27.0.1 (Darwin arm64 27.0.0)

Steps to Reproduce:

  1. Create a folder with both an apostrophe and parentheses in the name:
    mkdir -p "/Test's Folder (01)"
    echo 'print("hello")' > "
    /Test's Folder (01)/test.py"
  2. Open test.py in VS Code
  3. Click the ▶ Run button (or "Run Python File in Terminal")

Expected: script runs normally (confirmed working for paths without this apostrophe+parenthesis combination, e.g. a plain ~/test_run/test.py, which runs fine).

Actual: the file path argument gets wrapped in an extra escaped quote layer before being sent to the interpreter. Terminal shows:
/opt/homebrew/bin/python3 ""/Users/.../Test's Folder (01)/test.py""
Result: can't open file '//"/Users/.../Test's Folder (01)/test.py"': [Errno 2] No such file or directory

Confirmed reproducible with --disable-extensions (so not caused by any extension, including Python/Pylance), across multiple terminal sessions, and with a brand-new, unrelated test folder (not specific to one project).

Activity

  1. errveen commented on Nov 6, 2026

    @errveen

    I am getting this exact same error, and I do not have any single or double quotes in my path. This just started occurring within the last two udpates of VSCode.

    /Library/Frameworks/Python.framework/Versions/3.15/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users//Library/Mobile Documents/comappleCloudDocs/.../"/Users//Library/Mobile Documents/comappleCloudDocs/.../main.py"': [Errno 2] No such file or directory

    I can run it from the command line and I can run it with the Python debugger.

  2. contactkfeige commented on Nov 9, 2026

    @contactkfeige

    Is there any update and/or ETA on this one? It's pretty annoying to have to run everything in debug or from the CLI.

  3. xfish33 commented on Nov 12, 2026

    @xfish33

    same error since 1.145

  4. thxtto24 commented on Nov 12, 2026

    @thxtto24

    Same error is still happening

  5. anthonykim1 commented on Nov 13, 2026

    @anthonykim1
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions