VS Code: "The isort server crashed 5 times in the last 3 minutes..."
Asked Answered
U

6

17

I may have messed up some environmental path variables.

I was tinkering around VS Code while learning about Django and virtual environments, and changing the directory path of my Python install. While figuring out how to point VS Code's default Python path, I deleted some User path variables.

Then, isort began to refuse to run.

I've tried uninstalling the extension(s), deleting the ms-python.'s, and uninstalling VS Code itself, clearing the Python Workspace Interpreter Settings, and restarting my computer.

Even if it's not my path variables, anyone know the defaults that should be in the "user" paths variables?

Unwilled answered 16/11, 2022 at 22:11 Comment(0)
U
-3

I ended up refreshing my Windows install. Was for the best because I'm repurposing an older machine anyway.

Unwilled answered 18/11, 2022 at 10:41 Comment(0)
J
15

Another reason maybe that you are using a python version older than 3.7, which isort is not supporting anymore. Here is a reference link.

Jahdiel answered 27/11, 2022 at 6:5 Comment(2)
Thanks a ton this was my issue on Rocky 8 (RHEL 8) LinuxHanselka
If you have to use a python version older than 3.7 in your project, you can set isort interpreter to a different python version in settings.Conveyance
E
9

I also had this error on one of my windows machines. I don't know why the isort extension only chrashed on this machine and worked well on the other windows machines.

I fixed it by manually setting the path to python.exe in the settings of the isort extension:

In VSCode go to Settings > Extensions > isort > Interpreter and enter the path to python.exe for example:

C:\WinPython\WPy64-39100\python-3.9.10.amd64\python.exe

Esme answered 16/2, 2023 at 10:46 Comment(0)
S
3

You need to find the location of the python.exe file.

Usually it is C:\Users\Admin\AppData\Local\Programs\Python\Python310\

You can also automatically add python to the system environment by deleting and reinstalling it. During installation, a small box is automatically checked to add environment variables.

Saltzman answered 17/11, 2022 at 1:43 Comment(3)
Thanks, @MingJie-MSFT! I have hope for this solution, but I got an error when uninstalling Python. I used geek uninstaller to remove Python and as I go to reinstall, I still get an error log. Here are the two codes that appear repeatedly: Error 0x80072ee7: Failed to send request to URL: python.org/ftp/python/3.11.0/amd64/core_pdb.msi, trying to process HTTP status code anyway. Error 0x80072ee7: Unknown HTTP status code 0, returned from URL: python.org/ftp/python/3.11.0/amd64/core_pdb.msi Error 0x80070003: Failed to install MSI package. Ideas? Thanks!Unwilled
I tried reinstalling .NET framework to fix the issues and am getting fatal error during installation: 0x80070643. I've also tried using Windows Troubleshooting tool for Windows Update. It says that it changed something, but I did not fix my fatal error. Forgive me for the terrible formatting, I'm trying to figure out how you did the multiple linebreaks in a row.Unwilled
You can refer to this issue to learn about how to uninstall python.Saltzman
L
0

only change your python interpreter on VScode

Lizabethlizard answered 25/3, 2023 at 3:8 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Superfluous
K
0

I tried updating the path of interpreter, but it didn't work.

The version of my system Python was 3.6.9, which didn't work.

I then used the version of 3.11.4 for the interpreter path, and it worked.

I believe old Pythons are deprecated.

Kurd answered 13/6, 2023 at 0:42 Comment(0)
U
-3

I ended up refreshing my Windows install. Was for the best because I'm repurposing an older machine anyway.

Unwilled answered 18/11, 2022 at 10:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.