Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isort is using incorrect path to python binary #20660

Closed
karrtikr opened this issue Feb 7, 2023 · 4 comments
Closed

isort is using incorrect path to python binary #20660

karrtikr opened this issue Feb 7, 2023 · 4 comments
Assignees
Labels
area-editor-* User-facing catch-all area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Milestone

Comments

@karrtikr
Copy link

karrtikr commented Feb 7, 2023

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)

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Feb 7, 2023
@karrtikr karrtikr self-assigned this Feb 7, 2023
@karrtikr karrtikr transferred this issue from microsoft/vscode-isort Feb 7, 2023
@karrtikr
Copy link
Author

karrtikr commented Feb 7, 2023

@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

@karrtikr karrtikr added info-needed Issue requires more information from poster area-editor-* User-facing catch-all area-environments Features relating to handling interpreter environments labels Feb 7, 2023
@karthiknadig
Copy link
Member

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

karrtikr pushed a commit that referenced this issue Feb 7, 2023
…when storing value (#20661)

For #20660

I'm not quite sure why this was done. It doesn't make sense to do this
only for display.
@karrtikr
Copy link
Author

karrtikr commented Feb 7, 2023

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

@raratiru
Copy link

raratiru commented Feb 8, 2023

Same issue here with isort, black formatter and flake8.

The pre-release of vscode-python fixed it.

@karrtikr karrtikr added bug Issue identified by VS Code Team member as probable bug verified Verification succeeded needs PR Ready to be worked on and removed info-needed Issue requires more information from poster triage-needed Needs assignment to the proper sub-team labels Feb 8, 2023
@karrtikr karrtikr added this to the February 2023 milestone Feb 8, 2023
@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-editor-* User-facing catch-all area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants