Skip to content

Symbol navigation via ctrl-t does not work when the microsoft language server is enabled (jedi disabled) #2637

Closed
@ogrisel

Description

@ogrisel

Environment data

  • VS Code version: 1.27.2
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6 or 3.7 built from source
  • Type of virtual environment used: virtualenv / python -m venv
  • Relevant/affected Python packages and their versions: N/A

Steps to reproduce:

Disable jedi in settings.json. Here the full settings.json I used to make sure that this issue is not caused by a problem in my config:

{
    "python.jediEnabled": false
}

Then try with the following mixed Python/Cython/C/C++ code base:

$ git clone https://github.com/scikit-learn/scikit-learn
$ cd scikit-learn
$ code .

Then hit "ctrl-t" and type "KMeans" for instance.

Actual behavior

The ctrl-t menu is never populated as expected (it stays empty). I have the same problem with other symbols defined in this project (e.g. LogisticRegression, check_array...).

The "Analysing workspace, 1 item remaining..." message never goes away.

Weirdly enough, hitting "F12" on a Python symbol defined in the workspace can make VS code navigate to it successfully. It's just the ctrl-t symbol search menu that's broken.

Expected behavior

Being able to open the k_means_.py file from the project folder in the workspace to navigate to the definition of the KMeans class.

Logs

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

Starting Microsoft Python language server.
Initializing for /volatile/ogrisel/.virtualenvs/py36/bin/python
##########Linting Output - pylint##########
[snip]

[Error - 09:52:35] Request workspace/symbol failed.
  Message: Object reference not set to an instance of an object.
  Code: -32000 
[object Object]
[Error - 09:52:36] Request workspace/symbol failed.
  Message: Object reference not set to an instance of an object.
  Code: -32000 
[object Object]
...

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

[nothing]

Also note that jedi has no problem with this workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions