Visual Studio Code: Command 'basedpyright: Restart Server' resulted in an error
Description
Using the command from the title of this issue in Visual Studio Code's Command Palette results in the following error:
A current workaround is to close and re-open Visual Studio Code.
Does this happen consistently? I've seen this happen sometimes with other extensions, it seems to be an issue with vscode
Anything interesting in the basedpyright tab of the output log?
From my rudimentary testing, one of the causes of this error happens to be basedpyright starting disabled. If you enable it under the right circumstances, no basedpyright logs ever appear upon opening any Python files (the dropdown option in the Output window is completely missing), and if you attempt to use the command, the error appears. This could be rectified by requiring extensions to be restarted upon its enabling.
yeah i still can't reproduce sorry. could you provide some more info please:
- vscode version
- are you using a vscode fork? (eg. vscodium, cursor, etc)
- what version of basedpyright you're using
- any basedpyright vscode settings changed?
- can you also try checking the log in the electron devtools (Help > Toggle Developer Tools) to see if there's anything basedpyright related
I get the same error.
VSCode version info (no fork):
Version: 1.106.0 (user setup)
Commit: ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57
Date: 2025-11-11T16:02:25.943Z
Electron: 37.7.0
ElectronBuildId: 12597478
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
Extension version:
Identifier: detachhead.basedpyright
Version: 1.33.0
Basedpyright version:
$ basedpyright --version
basedpyright 1.28.5
based on pyright 1.1.399
All extension settings are default.
The console in the developer tools doesn't show any basedpyright related output.
do you have the python extension enabled? if not, it could be the same issue as #1188
see this warning in the vscode installation instructions for more info