You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
File path with apostrophe + parentheses gets double-quoted when running via Run button / integrated terminal #2026
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:
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"
Open test.py in VS Code
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).
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.
Activity
errveen commentedon Nov 6, 2026
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/com
appleCloudDocs/.../"/Users//Library/Mobile Documents/comappleCloudDocs/.../main.py"': [Errno 2] No such file or directoryI can run it from the command line and I can run it with the Python debugger.
contactkfeige commentedon Nov 9, 2026
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.
xfish33 commentedon Nov 12, 2026
same error since 1.145
thxtto24 commentedon Nov 12, 2026
Same error is still happening
anthonykim1 commentedon Nov 13, 2026
Eduardo Villalpando Mello (@edvilme) Seems related to #1946