microsoft / vscode-isort

Import sorting for python using the isort library.
https://marketplace.visualstudio.com/items?itemName=ms-python.isort
MIT License
87 stars 21 forks source link

The isort server crashed 5 times in the last 3 minutes. The server will not be restarted. #147

Closed bicofevo closed 2 years ago

bicofevo commented 2 years ago

With every VSCode launch that error message appears: image

VSCode version details: image

isort version - v2022.4.0

Let me know if more details needed.

karthiknadig commented 2 years ago

Can you share the logs from Output > isort? If you are using Python 3.6 or older it is not supported. image

rfbr commented 2 years ago

Hello there! Jumping in because I have also the same error since yesterday. Here are the log on my side:

SyntaxError: future feature annotations is not defined
[Info  - 9:03:40 AM] Connection to server got closed. Server will restart.
  File "#/.vscode-server/extensions/ms-python.isort-2022.4.0/bundled/tool/server.py", line 4
    from __future__ import annotations
asommani commented 2 years ago

Hi, I also started getting this error since yesterday! It's really annoying because my IntelliSense stop working as well.

asommani commented 2 years ago

I am working on a ssh server. I have also noticed that if I delete the folders ~/.vscode-server/extensions/ms-python.isort* and ~/.vscode-server/extensions/ms-python.vscode.pylance*, then my IntelliSense start working again. Now I am very confused because I thought that the IntelliSense was contained in the pylance extension.

eleanorjboyd commented 2 years ago

Please upgrade your python to 3.7 or newer or the other option is to uninstall the isort extension and python extension then install python extension version 2022.8.*.

asommani commented 2 years ago

I am using python 3.9.0 and still having the problem...

asommani commented 2 years ago

I don't think this issue should be closed then.

eleanorjboyd commented 2 years ago

Hi @asommani! Can you please file a separate issue with the logs from output > isort. Thanks!

karthiknadig commented 2 years ago

@asommani SyntaxError: future feature annotations is not defined in logs is very specific to python 3.6 or below. the annotations feature was added to python in 3.7. So, if you look at the logs and you see that error then, isort is running using python 3.6.

If it is anything else, we will have to investigate it separately. Please file a separate bug.

weedfreer commented 1 year ago

Please upgrade your python to 3.7 or newer or the other option is to uninstall the isort extension and python extension then install python extension version 2022.8.*.

Is this my only option if I wanted to use VSCode to test code which needs to be written in Python versions older than 3.7 owing to a programming suite utilising a Python codebase older than this though?

Surely VSCode isn't just ignoring the fact that older versions of Python exist and are still very much in use...are they?

The above seems to be such a painful way of having to deal with the situation to me.

EDIT: The above detailed method does not appear to work either...this is a pain as I could do with being able to debug versions older than 3.7

hmm