Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python IntelliSense not working #6400

Closed
rjpost20 opened this issue Sep 16, 2024 · 10 comments
Closed

Python IntelliSense not working #6400

rjpost20 opened this issue Sep 16, 2024 · 10 comments
Assignees
Labels
needs repro Issue has not been reproduced yet waiting for user response Requires more information from user

Comments

@rjpost20
Copy link

rjpost20 commented Sep 16, 2024

Type: Bug

I have VS Code version 1.90.2 running on Windows 10. Recently I noticed that most if not all of my IntelliSense features are not working in my Python files.

  • Nothing happens when I hover over types (functions, variables, etc.) in Python files
  • Ctrl + Click on a type does nothing
  • Ctrl + Right Click results in the same menu as Ctrl + Left Click

I cannot jump to a type definition, view type definitions, etc. because of this.
I have tried/checked:

  • Restarting VS Code
  • Disabling all extensions and re-enabling
  • Making sure Python + Pylance are installed
  • Making sure workspace is trusted
  • Making sure hovering is enabled
  • Making sure IntelliSense is enabled

Extension version: 2024.14.1
VS Code version: Code 1.90.2
OS version: Windows_NT x64 10.0.19045

UPDATE: It appears that the issue may be that latest version of Pylance (v2024.8.2) is not compatible with VS Code 1.90.2

@karthiknadig
Copy link
Member

@rjpost20 For python extension 2024.14.1 you need VS Code 1.93.0.

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Sep 16, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Sep 16, 2024
@debonte
Copy link
Contributor

debonte commented Sep 20, 2024

@rjpost20, it's possible that Pylance crashed. Can you please switch to our latest prerelease build and see if the issue goes away? There was a recent crash related to interactive windows. Perhaps you were hitting that.

If prerelease doesn't fix the issue, can you provide your "Python Language Server" log from the Output pane?

@debonte debonte added the waiting for user response Requires more information from user label Sep 20, 2024
@JoostHazelzet
Copy link

JoostHazelzet commented Sep 26, 2024

I experience this issue too since I upgraded Python extensions and VSCode. IntelliSense did work after upgrade but it stopped recently. I was not able to restore it. I use VSCode on MacOS (version 1.93.1) and work via remote tunnel on Ubuntu (code version 1.93.1). The extensions: Python v2404.14.1 and Pylance v2404.14.2. The python.languageServer is set to Default.

This is screenshot of what I see now:
Screenshot 2024-09-26 at 08 18 11
If IntelliSense works then the imported packages show green. Hopefully you have a tip for me how to restore IntelliSense because I miss it. Thank you.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 26, 2024

@JoostHazelzet can you provide your 'Python Language Server' output?

@JoostHazelzet
Copy link

Sure, but I don't have 'Python Language Server' in the dropdown list of Output. I only see 'JSON Language Server'.

@rchiodo
Copy link
Contributor

rchiodo commented Sep 26, 2024

What does your 'Python' output show? And what's your version of Pylance. 2404.14.2 is not a Pylance version number. That's likely the Python extension.

@JoostHazelzet
Copy link

My mistake, Pylance extension is on version v2024.9.2. Here is the Python output:

python.log

@rchiodo
Copy link
Contributor

rchiodo commented Sep 26, 2024

Are you sure your Pylance extension is enabled? And that the 'Language server' option for Python is 'Default' or 'Pylance'?

There should be a line like this in the 'Python' log:

2024-09-26 09:02:02.900 [info] Starting Pylance language server.

@JoostHazelzet
Copy link

I noticed the error messages in the python log referring to a former Mamba environment. I decided for a reinstallation of VSCode and recreation of this Mamba environment which solved the issue for me. Pylance is working like a charm again. Thank you for your support.

@debonte
Copy link
Contributor

debonte commented Sep 27, 2024

Ok if you see the issue again, feel free to reactivate this issue.

@debonte debonte closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

5 participants