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

Python interpreter path containing whitespaces fails to execute #24797

Open
juanfcocontreras opened this issue Feb 7, 2025 · 2 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs PR Ready to be worked on

Comments

@juanfcocontreras
Copy link

Type: Bug

Behaviour

In previous versions, the interpreter could be in paths with whitespaces, as it was enclosed by quotes. In this latest version, this is not the case, and it results in an error.

Steps to reproduce:

  1. Set up a virtual environment with a path that includes a whitespace.
  2. Try running it.

Diagnostic data

Output for in the Terminal panel

> /Users/user/Desktop/Projects/2024 Folder/code/groq/.venv/bin/python "/Users/user/Desktop/Projects/2024 Folder/code/groq/gui.py"

zsh: no such file or directory: /Users/user/Desktop/Projects/2024

Extension version: 2025.0.0
VS Code version: Code 1.97.0 (33fc5a94a3f99ebe7087e8fe79fbe1d37a251016, 2025-02-04T22:41:26.688Z)
OS version: Darwin arm64 24.3.0
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.13.2.final.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
  • Value of the python.languageServer setting: Pylance
User Settings


languageServer: "Pylance"

experiments
• optInto: ["All"]

Installed Extensions
Extension Name Extension Id Version
austin-vscode p40 0.17.3
autodocstring njp 0.6.1
Bookmarks ale 13.5.0
commands use 1.14.1
continue Con 0.8.66
datawrangler ms- 1.18.0
debugpy ms- 2025.0.0
djlint mon 2024.10.0
errorlens use 3.23.0
even-better-toml tam 0.21.2
file-properties-viewer bru 1.2.0
git-graph mhu 1.30.0
gitignore cod 0.9.0
gitpatch par 0.2.1
gremlins nho 0.26.0
harper eli 0.19.1
icons tal 3.8.0
indent-rainbow ode 8.3.1
jinjahtml sam 0.20.0
js-debug ms- 1.97.0
js-debug-companion ms- 1.1.3
jupyter ms- 2025.1.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.1.0
live-server ms- 0.4.15
nicegui Dae 0.6.1
numbermonger sof 0.5.0
open-in-browser tec 2.0.0
path-intellisense chr 2.10.0
pdf tom 1.2.2
project-tree zhu 0.3.0
python ms- 2025.0.0
quarto qua 1.118.0
rainbow-csv mec 3.16.0
remote-containers ms- 0.397.0
remote-explorer ms- 0.4.3
remote-ssh ms- 0.117.0
remote-ssh-edit ms- 0.87.0
replacerules bhu 0.4.2
resourcemonitor mut 1.0.7
ruff cha 2025.6.0
sftp Nat 1.16.3
shiny Pos 1.1.0
text-power-tools qcz 1.50.0
theme-dark-plus-contrast k3a 1.76.0
vscode-commons red 0.0.6
vscode-dash dee 2.4.0
vscode-django bat 1.15.0
vscode-dotnet-runtime ms- 2.2.6
vscode-js-profile-table ms- 1.0.10
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
vscode-map-preview jum 0.7.0
vscode-open san 0.3.0
vscode-pylance ms- 2025.2.1
vscode-python-envs ms- 0.3.10381013
vscode-readme thr 0.0.2
vscode-todo-plus fab 4.19.1
vscode-xml red 0.27.2
vscode-yaml red 1.15.0
System Info
Item Value
CPUs Apple M3 (8 x 2400)
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
webnn: disabled_off
Load (avg) 3, 3, 3
Memory (System) 24.00GB (0.06GB free)
Process Argv
Screen Reader no
VM 0%
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 7, 2025
@karthiknadig
Copy link
Member

@karthiknadig Looks like this is using the environments extension. To confirm, this happens when you use the Run In Terminal command right?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Feb 10, 2025
@karthiknadig karthiknadig added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs PR Ready to be worked on and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Feb 10, 2025
@juanfcocontreras
Copy link
Author

juanfcocontreras commented Feb 10, 2025

@karthiknadig Looks like this is using the environments extension. To confirm, this happens when you use the Run In Terminal command right?

Yes, when I click on Run Python File button or Run Python File In Terminal in the context menu.

And yes, if I disable Python Environments extension, the path is enclosed by quotes and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster needs PR Ready to be worked on
Projects
None yet
Development

No branches or pull requests

2 participants