'PyCharm project files have disappeared

I was working on a python project in JetBrains PyCharm 2016.2 on Lubuntu and all of a sudden, all my project files have disappeared from the IDE.

I have tried the following with no success:

  1. Exit PyCharm, navigate to project root, delete the .idea file, open PyCharm, create a new project from the current projects source. Result: seems to load fine, but cannot see any project files in either "Project" view or individually load and view any files.

  2. Fresh download and run of PyCharm, repeating the above step. Result: Same as option 1.

  3. Using File > Open to open the project again. Result: Same as option 1.

I can do a search by file or class name within PyCharm and the search does find the files. But on selecting one to load from the search results, the search dialogue just closes and the file is not loaded.

Also to clarify, I still have the files on disk in the project root physically. But PyCharm is not displaying them in the IDE.



Solution 1:[1]

Ok so I have found the issue, which turned out to be indirect in the end. I just installed the latest updates for Lubuntu, restarted the PC, then opened PyCharm and like magic all my project files are now visible!

I know it was not just the restart because I had already tried that. So it must have been one or more of the updates. I'm not going to list all the updates here, there were a lot, but this solved my issue anyway.

Solution 2:[2]

I had the issue with PyCharm 2020.3.5 on macOS Big Sur 11.1.

My solution was:

  1. Preference -> Project: <ProjectName> -> Project structure
  2. Click + Add Content Root at the right pane and select my project directory in a file browser

Solution 3:[3]

Try this: Go to File -> Open recent you should see a list of your recent projects there. If you still don't see it there then just reopen the project by going to File -> Open and go to the location where you saved your project.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy
Solution 2 asvx
Solution 3 Parth Bhoiwala