Repository navigation
Closed
Labels
bugIssue identified by VS Code Team member as probable bug
Description
Environment data
- VS Code version: 1.57.1
- Extension version (available under the Extensions sidebar): 2021.6.944021595
- OS and version: Windows 10 20H2
- Python version (& distribution if applicable, e.g. Anaconda): CPython 3.8.10
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Value of the
python.languageServersetting: Pylance
Expected behaviour
The following tasks work:
{
"label": "pywxrc",
"type": "process",
"command": "${command:python.interpreterPath}",
"options": {
"cwd": "${workspaceRoot}"
},
"args": ["-m", "wx.tools.pywxrc", "-p", "-g", "-e", "-v", "-o", "rdgui_xrc.py", "rdgui.xrc"],
"problemMatcher": [],
"group": "build",
"dependsOn": ["clean pywxrc"]
},
{
"label": "clean pywxrc",
"type": "shell",
"command": "rm",
"windows": {
"command": "del",
},
"options": {
"cwd": "${workspaceRoot}"
},
"args": ["rdgui_xrc.py"],
"problemMatcher": []
}Actual behaviour
> Executing task: D:\path\to\workspace\d:\path\to\venv\Scripts\python.exe -m wx.tools.pywxrc -p -g -e -v -o rdgui_xrc.py rdgui.xrc <
The terminal process failed to launch: Path to shell executable "D:\path\to\workspace\d:\path\to\venv\Scripts\python.exe" does not exist.
Logs
Output for Python in the Output panel
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonJediLSP'
User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher'
User belongs to experiment group 'pythonTensorboardExperiment'
User belongs to experiment group 'PythonPyTorchProfiler'
User belongs to experiment group 'pythonDeprecatePythonPath'
Python interpreter path: C:\Python38\python.exe
Python interpreter path: d:\path\to\venv\Scripts\python.exe
Starting Pylance language server.
> d:\path\to\venv\Scripts\python.exe -m pylint --extension-pkg-whitelist=wx --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\path\to\workspace\config.py
cwd: d:\path\to\workspace
> d:\path\to\venv\Scripts\python.exe -m pylint --extension-pkg-whitelist=wx --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text d:\path\to\workspace\config.py
cwd: d:\path\to\workspace
##########Linting Output - pylint##########
> conda --version
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bug
Activity
[-]${command:pythonInterpreterPath} [/-][+]${command:pythonInterpreterPath} in tasks.json[/+][-]${command:pythonInterpreterPath} in tasks.json[/-][+]${command:python.InterpreterPath} in tasks.json[/+][-]${command:python.InterpreterPath} in tasks.json[/-][+]${command:python.interpreterPath} in tasks.json[/+]eleanorjboyd commentedon Jun 28, 2021
Hello,
python.pythonPathandpython.defaultInterpreterPath?d:\path\to\venv\Scripts\python.exe, try using the path which is local to workspace.jeremyd2019 commentedon Jun 28, 2021
The output from the python output channel is included in the collapsing details/summary section
jeremyd2019 commentedon Jun 28, 2021
My venv is not inside the workspace folder. I tried selecting python interpreter in the UI (since it doesn't store that in settings anymore but in workspace storage I don't know how to edit manually) and typing in
..\venv\Scripts\python.exe, but got the same results.jeremyd2019 commentedon Jun 28, 2021
This worked fine before I got in this experiment, and changed my tasks.json from
${config:python.pythonPath}to${command:python.interpreterPath}[-]${command:python.interpreterPath} in tasks.json[/-][+]${command:python.interpreterPath} in tasks.json when in `pythonDeprecatePython` experiment[/+][-]${command:python.interpreterPath} in tasks.json when in `pythonDeprecatePython` experiment[/-][+]${command:python.interpreterPath} in tasks.json when in `pythonDeprecatePythonPath` experiment[/+]karrtikr commentedon Jun 28, 2021
I see, while we try to reproduce this, you can temporarily opt out of this experiment by following the instructions in the wiki.
brettcannon commentedon Jul 12, 2021
We were not able to reproduce the issue, which means we can't unfortunately attempt to fix it since we can't get it to fail in the first place.
We are going to pre-emptively close this issue, but if the issue continues and you can come up with very specific reproduction steps (like a test repo with the appropriate settings and a step-by-step guide of what to do once the test repo is opened) we would be happy to try to reproduce it again.
jeremyd2019 commentedon Jul 16, 2021
OK, I've opted out of the experiment and reverted to using
${config:python.pythonPath}, and it's working fine now.Artalus commentedon Aug 18, 2021
Got the same issue.
VS Code:
Python extension:
tasks.json:Default interpreter:

Task output:
Initially I got the same issue in the folder where I had virtualenv in a subfolder:
VS Code in there uses a relative path ro interpreter for some reason:

brettcannon commentedon Aug 23, 2021
Artalus can you please open a new issue?