microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 766 forks source link

Python IntelliSense not working #6400

Closed rjpost20 closed 1 month ago

rjpost20 commented 2 months ago

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.

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

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 commented 2 months ago

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

debonte commented 2 months ago

@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?

JoostHazelzet commented 1 month ago

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 commented 1 month ago

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

JoostHazelzet commented 1 month ago

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

rchiodo commented 1 month ago

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 commented 1 month ago

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

python.log

rchiodo commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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