Reputation: 3538
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:
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.
Fresh download and run of PyCharm, repeating the above step. Result: Same as option 1.
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.
Upvotes: 19
Views: 17634
Reputation: 6779
I ran into this and none of the solutions worked (including restarting my computer, re-installing IDE, etc.)
then I realized it was about somehow PyCharm switched to Project files rather than Project (maybe there was a shortcut I accidentally pressed or ssomething like that)
Switching back to project fixed it for me.
edit: I also figured the shortcut. apparently I clicked on the project part, and then did "command + shift + ]" (to change to right tab). mystery solved
Upvotes: 0
Reputation: 135
In my case I had to remove the line <component name="ProjectId" id="<random_characters_here>" />
from .idea/workspace.xml
(or change id
's value). If you remove it Pycharm seems to just regenerate an id the next run.
The id
's value is probably linked somewhere in Pycharm's data but I haven't looked into it further.
Upvotes: 0
Reputation: 51
For MacOS users who are trying to load a project from the Downloads folder:
In System Settings, go to "Privacy and Security", then "Files and Folders"; find PyCharm, and make sure that "Downloads Folder" is enabled.
Upvotes: 5
Reputation: 1
Right click on the folder that should contain files and select Reload from Disk
This is what worked for me after trying to toggle all the various settings in the IDE, none of which worked.
Upvotes: 0
Reputation: 11
First of all, please try File | Invalidate Caches | Invalidate and Restart with Clear file system cache... enabled. If it doesn't help, is your home directory entirely local? Not a network mount of any type? Also, have you tried 2021.3 EAP?
Upvotes: 1
Reputation: 415
I had the issue with PyCharm 2020.3.5 on macOS Big Sur 11.1.
My solution was:
Preference -> Project: <ProjectName> -> Project structure
+ Add Content Root
at the right pane and select my project directory in a file browserUpvotes: 28
Reputation: 3538
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.
Upvotes: 0
Reputation: 1322
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.
Upvotes: 3