Skip to content

Don't set ${workspaceFolder} in settings.json #2459

@segevfiner

Description

@segevfiner

Environment data

  • VS Code version: 1.26.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Windows 10.0.17134.228 x64
  • Python version (& distribution if applicable, e.g. Anaconda): CPython 3.7.0 x64
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv

Actual behavior

When python.pythonPath includes ${workspaceFolder}, tasks that use ${config:python.pythonPath} fail to start:

> Executing task: ${workspaceFolder}\venv\Scripts\python.exe setup.py build_ext --inplace <

The system cannot find the path specified.
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

Expected behavior

The tasks should start correctly. It's quite useful to use ${config:python.pythonPath} in your tasks so as to use the Python version used by vscode-python to run the tasks.

Steps to reproduce:

  1. Create a virtualenv under your workspace: virtualenv venv
  2. Select it as the Python interpreter of VS Code using the status bar. (python.pythonPath should be set to a path using ${workspaceFolder}).
  3. Create a task that uses ${config:python.pythonPath} to run anything you want, and try to run it.

Logs

Nothing relevant under default log level.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions