The Python Server Crashes Unexpectedly. Am able to run in debug mode but the Linting is not working. Could anybody help me out please?
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:
- Uninstall Python extension (if you have pylance uninstall it first).\
- Close all instances of VS Code.\
- Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.\
- Delete any folder with the name starting with ms-python.python*\
- Start VS Code, and install Python extension (also pylance if you uninstalled it in step 1).
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)
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.
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.
I had turned on "Python: Pylance Lsp Notebooks Enabled" setting. Turning it off did the trick.
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.
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.
© 2022 - 2025 — McMap. All rights reserved.
Python Language Server
? You can find it in the OUTPUT panel -> Python Language Server channel. – Phocomelia