Command 'Python: Restart Language Server' resulted in an error (command 'python.analysis.restartLanguageServer' not found)
See original GitHub issueHello, there! I just saw the news in the release notes of 2020.8.101144: ‘Add “Restart Language Server” command.’ and was excited! This way I just got the notion about a completely new background Language Server, as a dedicated replacement for Jedi? 👍
I see that note about the new language server and the possible relation but this seems like a feature above the language server itself! So yes: If I set python.languageServer
to Pylance there are other issues but I can restart with this command 👍
Now if it’s vscode-python
that starts Jedi as a language server. That command should be able to restart it?
Environment data
- VS Code version: 1.48.0
- Extension version: 2020.8.101144
- OS and version: Windows 10 Pro 2004
- Python version: 2.7.18 / 3.8.4
- Value of the
python.languageServer
setting: Jedi
[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'
), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
Language Server restarts
Actual behaviour
Error message:
Command 'Python: Restart Language Server' resulted in an error (command 'python.analysis.restartLanguageServer' not found)
Steps to reproduce:
- Set language server to Jedi
- in command palette call
Python: Restart Language Server
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:10 (3 by maintainers)
Top GitHub Comments
@JP01 Try this and see if it helps. Some times it is just a bad install. Looks like you might have a bad update. Do the following to remove stale versions of the extension:
%USERPROFILE%/.vscode/extensions
(on windows) or~/.vscode/extensions
on Linux/Mac.ms-python.python*
Ah, after I re-created my virtualenv (I’m using pyenv+pyenv-virtualenv), restarted VS Code, then re-selected the interpreter using
Python: Select Interpreter
, the issue is resolved for me.