Skip to content

isort is using incorrect path to python binary #20660

@karrtikr

Description

@karrtikr

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 @zebra-f in #20644 (comment)

Metadata

Metadata

Assignees

Labels

area-editor-*User-facing catch-allarea-environmentsFeatures relating to handling interpreter environmentsbugIssue identified by VS Code Team member as probable bugneeds PRReady to be worked onverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions