Code analysis never finishes
Code analysis on my Python files is never finishing. The little eye remains in the top-right corner. Any errors that show up from static analysis don't go away when I fix the code, until I close the whole project and open it again. This is all happening in Pycharm CE 2017.1.2. Looking at similar previous issues, I have tried the 'Invalidate Caches / Restart' menu option, but it does not solve the problem.
I've just uploaded idea_takluyver_stuck_analysis.log (at https://uploads.services.jetbrains.com/ ). Looking at this log file, it looks like it's infinitely recursing while trying to resolve Python imports. There are StackOverflowErrors with many frames in PyResolveImportUtil and ResolveImportUtil . There may well be some circular imports in Python modules which could cause this, but earlier versions of PyCharm have been able to handle this OK.
I'm happy to provide further info if necessary.
请先登录再写评论。
Hello Thomas, thank you for the report.
Please check the problem with the latest Pycharm 2017.1.3 RC build: https://confluence.jetbrains.com/display/PYH/JetBrains+PyCharm+Preview+%28EAP%29. Does the update help?
Thanks Anna. I've just upgraded to the EAP (build #PC-171.4424.42), and I still see the issue.
Thank you for the update. Please file an issue to PyCharm bug-tracker: https://youtrack.jetbrains.com/issues/PY with your zipped log folder (Help| Show log) to let us investigate it. Please let me know if you have any problems with it.
Thanks, filed as https://youtrack.jetbrains.com/issue/PY-24272 :-)
I also encounter a similar problem from time to time. Sometimes code analysis is finished pretty soon, but sometimes code analysis for the same file seems to never end for more than 30 minutes.
I am using PyCharm 2020.2.2 (Prefessional Edition), Build #PY-202.7319.64
@...
Please try **File | Invalidate Caches / Restart… | Invalidate and Restart** , and if this doesn't help, please provide:
1. Screenshot of your interpreter settings
2. Logs from **Help | Collect Logs and Diagnostic Data**
You can use our uploading service at https://uploads.jetbrains.com/ , and provide upload ID in your reply.
Run into the same issue today, a brand new project for IDEA, a few python files, and several packages. All of a sudden, IDE started to consume all the CPU. Did an investigation and found that it analyzes the current file over and over again. I opened another project and it was fine. I invalidated caches and restarted IDE. It quickly regenerated an unaffected project and failed to generate indexes for the affected one. Well, not fail, but it took forever to make an index for each single file that was suitable for indexing.
At this point, I decided to clean the project manually, and I started by cleaning up the workspace file 🙂. So I found a related XML file in the "~/Library/Application Support/JetBrains/IntelliJIdea2024.1/workspace" folder (under MacOS) and removed it.
Opened the project and the problem is gone! 🎉 IDE quickly generated indexes and didn't went crazy analyzing opened files!
Hope this will help someone 🙏