Skip to content

isort is using incorrect path to python binary #20660

Closed as not planned
Closed as not planned

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

Activity

  1. karrtikr commented on Feb 7, 2023

    @karrtikr
    Author

    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:

    image

  2. karthiknadig commented on Feb 7, 2023

    @karthiknadig
    Member

    This is what we use to get the interpreter, is that incorrect?:
    image

  3. karrtikr commented on Feb 7, 2023

    @karrtikr
    Author

    Potential fix mentioned here #20660 (comment) should be out in pre-release.

  4. raratiru commented on Feb 8, 2023

    @raratiru

    Same issue here with isort, black formatter and flake8.

    The pre-release of vscode-python fixed it.

  5. added
    bugIssue identified by VS Code Team member as probable bug
    verifiedVerification succeeded
    needs PRReady to be worked on
    and removed
    info-neededIssue requires more information from poster
    triage-neededNeeds assignment to the proper sub-team
    on Feb 8, 2023
  6. locked as resolved and limited conversation to collaborators on Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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