basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

Visual Studio Code: Command 'basedpyright: Restart Server' resulted in an error

Open jack5github opened this issue 4 months ago • 5 comments

Description

Using the command from the title of this issue in Visual Studio Code's Command Palette results in the following error:

Image

A current workaround is to close and re-open Visual Studio Code.

jack5github avatar Oct 07 '25 22:10 jack5github

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?

DetachHead avatar Oct 07 '25 23:10 DetachHead

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.

jack5github avatar Oct 07 '25 23:10 jack5github

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

DetachHead avatar Oct 08 '25 10:10 DetachHead

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.

wolfm89 avatar Nov 16 '25 14:11 wolfm89

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

DetachHead avatar Nov 19 '25 13:11 DetachHead