The Python Tools server crashed 5 times in the last 3 minutes. The server will not be restarted
Asked Answered
B

7

16

The Python Server Crashes Unexpectedly. Am able to run in debug mode but the Linting is not working. Could anybody help me out please?

Behead answered 14/8, 2021 at 11:56 Comment(3)
Welcome to SO. Please read the following documentation, then edit, and rephrase the question. Take the Tour, How to ask a good question, & On Topic.Infold
@Behead Could you paste the log of the Python Language Server? You can find it in the OUTPUT panel -> Python Language Server channel.Phocomelia
You can try this github.com/microsoft/vscode-python/issues/3977.Hach
N
5

I was able to resolve this by following the steps to reinstall the Python extension found here: https://github.com/microsoft/vscode-python/issues/13679#issuecomment-683899458

Copying steps here:

  1. Uninstall Python extension (if you have pylance uninstall it first).\
  2. Close all instances of VS Code.\
  3. Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.\
  4. Delete any folder with the name starting with ms-python.python*\
  5. Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).
Nickola answered 30/11, 2022 at 5:43 Comment(1)
This totally worked for me. Thanks!Haver
R
2

Change the language server to Pylance

Go to VSCode Preferences -> Settings -> Extensions -> Python -> Change the "Language Server" setting to "Pylance" (install Pylance extension if needed)

Richart answered 24/10, 2023 at 17:16 Comment(0)
G
1

I had a similar issue, which I resolved based on this answer. What I found was opening the folders individually seemed to work fine, but if I opened the workspace it caused the issues.

Deleting the workspace and creating a new one seemed to solve the issue.

Greisen answered 21/10, 2021 at 14:8 Comment(0)
P
1

If anyone is facing this issue in the containers then this did the trick for me:

Run the following the command inside the container:

rm -rf ~/.vscode-server/

Reopen vscode

It removes all the cached data for that particular container.

Protect answered 3/6, 2022 at 9:28 Comment(0)
N
0

I had turned on "Python: Pylance Lsp Notebooks Enabled" setting. Turning it off did the trick.

Northcliffe answered 10/10, 2022 at 17:22 Comment(0)
L
0

Note that, if you connect a Linux server, you will not find the ~/.vscode/extensions folder but the ~/.vscode-server/extensions folder.

Then do the same operations like the first answer.

Leighleigha answered 13/4, 2024 at 2:36 Comment(0)
K
0

In my case I was working in the virtual env in windows. I was getting error msg like "Jedi server crashed 5 times in the last 3 minutes." when I was running the the cell of the notebook.

I just deleted the virtual environment and created new virtual environment. It started working. I am not sure what was the probelm. May be due to corrupted packages. I tried other mentioned things above but it did not work.

Kerek answered 15/6, 2024 at 2:16 Comment(1)
Welcome to StackOverflow. Please, edit and try for How to Answer, describe the effect of what you propose and explain why it helps to solve the problem. Consider taking the tour. Have fun.Phenosafranine

© 2022 - 2025 — McMap. All rights reserved.