PyCharm does not highlight unused imports and not installed imports anymore

Hi!

I have a problem with imports in project files. Until a while ago it used to grey out unused imports and to highlight with a red underline missing packages that I'm trying to use. Now, I can type in whatever package I want, even non-existing but it doesn't highlight anything anymore, but letting me know it`s not in project's requirements.txt

Basically a while ago, the non existing packages would've been highlighted and when hovering above them or hitting CTRL + Enter it would've show me a pop-up to install the package.

For the unused, it would've grey out the packages so I know I can delete them because they are not used.

 

What should I edit to fix this? It's getting annoying.

0
5 comments
Hello,
I wasn't able to reproduce the issue on the latest. Please try upgrading the IDE and do File | Invalidate caches with all options checked.
If this doesn't help to solve the issue, please get IDE logs with Help | Collect Logs and Diagnostic Data, upload the archive here: https://uploads.services.jetbrains.com/ and tell us the upload ID.
0

Hi,

In my case, non-existent package imports are marked with a red wavy line, but unused package imports are not grayed out. Invalidate caches did not help.

0

IDEGUTI Masaya Do you have any NON-ASCII characters on the project/venv path? We have a similar report to such problems here: PY-75846

If not, please create a new YouTrack report, including the  IDE logs with Help | Collect Logs and Diagnostic Data. Most probably, the root cause of your case is different

0

Thank you, Miguel,

I do not have any NON-ASCII characters on the path. I have just uploaded the IDE logs with ID: 24_11_01_rdnsmGgRAZMPgCAkjakUCc

Thank you in advance.

Masaya

0

I noticed that in another project, unused package imports are grayed out. I have a feeling that this has something to do with the project settings or something similar. I hope this information helps you in some way.

Regards,
Masaya

0

Please sign in to leave a comment.