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
Run Python File passes literal quotes in script path to terminal #26274
The top-right Run Python File button fails when the Python script is in a path containing spaces and Python Environments handles terminal execution.
Expected: Python runs the selected file.
Actual: The terminal receives a script argument with literal double quotation marks inside single quotes. Redacted equivalent of the observed command:
/usr/local/bin/python3 '"/path with spaces/main.py"'
Python reports [Errno 2] No such file or directory because the double quotation marks become part of the filename. The error path includes the current directory followed by "/path with spaces/main.py" instead of the actual script path.
Steps to reproduce
Install and enable the Python and Python Environments extensions.
Open a Python file inside a directory with spaces in its path.
Click the top-right Run Python File button.
Observe the terminal command and error.
Running the same script directly with a correctly quoted shell path succeeds.
Diagnostic data
VS Code: 1.145.0 (arm64)
Python extension: 2026.10.0
Python Environments extension: 1.42.0
Python interpreter: 3.14.7 at /usr/local/bin/python3
Activity