I just opened Visual Studio Code and this error is displayed at the bottom right of the screen.
The isort server crashed 5 times in the last 3 minutes. The server will not be restarted.
My code can run normally without any problems, but the message keeps popping up every time VSCode is opened.
How to solve this error?
2
Answers
I figured it out that
isort
is an extension in Visual Studio Code about sortingimport
s in python, which is not necessary to me. I don't even remember installing it myself.Therefore, I just uninstall the extension. As a result, the error goes away (of course).
Here are some other things for you to try – specifying hard paths to your conda (or otherwise) base Python environment’s copy of
python
andisort
, using"useBundled"
for the"isort.importStrategy"
.In the setup below we are using black for formatting, flake8 for linting and isort in black compatible mode.
isort
will inform the user when arguments are out of order. The sorting will happen automatically upon typing and upon save.It is really worth it to get this working – your code becomes pretty right before your eyes and everyone is on the same format settings in your project if you create workspace settings 🙂