vscode-python: Python Build workspace symbols not found

Environment data

  • VS Code version: 1.32.3
  • Extension version (available under the Extensions sidebar): 2019.3.6215
  • OS and version: Windows 10 10.0.17134
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3 64 bit
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
  • Relevant/affected Python packages and their versions: Just the python extension

Expected behaviour

Running python.buildWorkspaceSymbols to build the workspace symbols

Actual behaviour

I receive the error message “command ‘python.buildWorkspaceSymbols’ not found”

2019-04-01_16h05_12

Steps to reproduce:

  1. Ctrl + shift + p then running Python: Build Workspace Symbols

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

No information in the logs

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

notificationsAlerts.ts:38 Error: command 'python.buildWorkspaceSymbols' not found
    at Proxy._tryExecuteCommand (commandService.ts:59)
    at r.then.i (commandService.ts:52)
onDidNotificationChange @ notificationsAlerts.ts:38

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 20
  • Comments: 15 (1 by maintainers)

Most upvoted comments

To recreate this issue you can do the following steps:

  • Install python extension (ms-python.python)
  • Ctrl + shift + p then running Python: Build Workspace Symbols
  • Install Visual Studio IntelliCode - Preview (visualstudioexptteam.vscodeintellicode)
  • Open a python file and enable Microsoft Python Language Server (preview) when prompted
  • Ctrl + shift + p then running Python: Build Workspace Symbols

This results in the breaking behavior, the only way to resolve this is to wipe out the application completely as detailed in the above link

On Ubuntu adding "python.jediEnabled": true to Workspace Settings resolved the issue for me.

Note:

  1. Didn’t made any difference if I had Visual Studio IntelliCode installed/uninstaled, enabled/disabled.
  2. "python.jediEnabled": true needs to be explicitly added to Workspace Settings for it to work, although the Default Workspace Settings is the same.

Edit: Turns out that Visual Studio IntelliCode adds an entry in the User Settings disabling Jedi.

I have the same problem. Symbols do not work for a python file when the intellicode extension is installed and enabled. The symbols, however, do show up when I switch the language server from Microsoft to Jedi (add "python.languageServer": "Jedi"). Is there already a fix for using the Microsoft server with the python-vscode extension? Every time I try to build the symbols I receive the following error:

Command 'Python: Build Workspace Symbols' resulted in an error (command 'python.buildWorkspaceSymbols' not found)

System info

Vscode version:

Version: 1.49.0-insider
Commit: 3d5b2fecf2e6788cb9877d7d868d964fbc3ecd53
Date: 2020-08-18T06:38:22.900Z
Electron: 9.2.0
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.4.26-050426-generic snap

Python-vscode version: v2020.8.101144 Visual studio IntelliCode version: v1.2.10

workaround: Just remove the settings and configs of vscode (For windows: delete C:\Users\user_name\AppData\Roaming\Code)

I was also able to get it back in a working state by doing this

https://medium.com/@jimkang/complete-uninstall-remove-vscode-mac-5e48bef3bdec

However, this didn’t identify what caused it to be in a corrupt state.