profile
viewpoint

Ask questionsCommand 'Python: Restart Language Server' resulted in an error (command 'python.analysis.restartLanguageServer' not found)

Hello, 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:

  1. Set language server to Jedi
  2. in command palette call Python: Restart Language Server
microsoft/vscode-python

Answer questions karthiknadig

Looks like we have some issue with command registration. See related (but reverse issue) https://github.com/microsoft/vscode-python/issues/13441

useful!
source:https://uonfu.com/
answerer
Karthik Nadig karthiknadig @Microsoft Redmond Developer at Microsoft, working on VS Code Python and Python Debugger.
Github User Rank List