Repository navigation
isort is using incorrect path to python binary #20660
Copy link
Copy link
Closed as not planned
Labels
area-editor-*User-facing catch-allUser-facing catch-allarea-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Milestone
Description
Follow the steps to reproduce here: #20644 (comment). isort logs:
Opening with problems:
Name: isort
Module: isort
Python extension loading
Waiting for interpreter from python extension.
Python extension loaded
[Error - 10:41:57 AM] Starting client failed
Launching server using command /.venv/bin/python failed.
Opening without problems:
Name: isort
Module: isort
Python extension loading
Waiting for interpreter from python extension.
Python extension loaded
CWD Server: /home/rafal/Desktop/Tests/Python/venvtest
sys.path used to run Server:
/home/rafal/.vscode/extensions/ms-python.isort-2022.8.0/bundled/libs
/home/rafal/.vscode/extensions/ms-python.isort-2022.8.0/bundled/tool
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/home/rafal/Desktop/Tests/Python/venvtest/.venv/lib/python3.10/site-packages
Settings used to run Server:
[
{
"check": false,
"workspace": "file:///home/rafal/Desktop/Tests/Python/venvtest",
"logLevel": "error",
"args": [],
"severity": {
"W": "Warning",
"E": "Hint"
},
"path": [],
"interpreter": [
"/home/rafal/Desktop/Tests/Python/venvtest/.venv/bin/python"
],
"importStrategy": "useBundled",
"showNotifications": "off"
}
]
/home/rafal/Desktop/Tests/Python/venvtest/.venv/bin/python -m isort --version-number
CWD Linter: /home/rafal/Desktop/Tests/Python/venvtest
Version info for isort running for /home/rafal/Desktop/Tests/Python/venvtest:
5.10.1
SUPPORTED isort>=5.10.1
FOUND isort==5.10.1
Originally posted by Rafal Zebrowski (@zebra-f) in #20644 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-editor-*User-facing catch-allUser-facing catch-allarea-environmentsFeatures relating to handling interpreter environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onReady to be worked onverifiedVerification succeededVerification succeeded
Activity
karrtikr commentedon Feb 7, 2023
Rafal Zebrowski (@zebra-f) I wasn't able to reproduce this issue on Windows or codespaces, however I've merged a fix which could potentially fix this.
It should be out in the pre-release version of the extension in a day, use the following to try it out:
karthiknadig commentedon Feb 7, 2023
This is what we use to get the interpreter, is that incorrect?:

Ensure interpreter path isn't truncated for workspace-relative paths …
karrtikr commentedon Feb 7, 2023
Potential fix mentioned here #20660 (comment) should be out in pre-release.
raratiru commentedon Feb 8, 2023
Same issue here with
isort,black formatterandflake8.The pre-release of
vscode-pythonfixed it.