project on onedrive loses interpreter

I have projects whose folder sync from harddrive to MS OneDrive. I have three computers, two Mac and one PC. Since syncing with the cloudservice the project will "forget" its interpreter and nosetest configuration when I open PyCharm on any of the computers.

Is it a mistake to store my project this way? Any ideas on the cause?



I have exactly this problem!
While I work in PyCharm all is fine, I can exit PyCharm and restart: fine.

Now you reboot (and this probably severs and re-establishes) the clouddrive link and I find my settings gone.

So, I've moved the 'project' directory (which contains the .pycharm directory with settings xml files) to somewhere not backuped up by clouddrive and now the settings are retained.

I wonder: does pycharm keep the filedescriptors to the .xml files open all the time during work?


Technically, there shouldn't be any difference if the directory is backed up by to the cloud or not, if it's stored locally like a normal directory. Variations may occur depending on the specifics of OneDrive algorythms (which I unfortunately have no information about). For example, it can use symlinks, or it can store only information about the files, not files themselves on the storage device.

Now, the recommended way to work on one project on different PCs wound be to take advantage of the VCS, and setting synchronization features build into PyCharm.


Dear Andrey, thanks for your reply.

The usage of onedrive in my case is not for multi-pc working but for backup. So this is not exactly like the original post. 
I am not aware of other applications that suffer from having their files on the onedrive-mapped directory. Also I have no experience with projects on other cloud-services. It is even possible the problem only appears in an enterprise environment.

So, I use the workaround of having the projects (and specifically the .idea directory that goes with it) on a directory outside onedrive, but it took me weeks to figure out why this problem suddenly appeared after moving to the combo win10 + onedrive (this was introduced in our company in 1 move, with hw-updates)



Maybe OneDrive has issues with dotted files/directories? The project settings are saved in .idea directory in project root, and the only reason your project-related settings can be gone after the restart and re-opening the project, is because PyCharm can't read the files in that directory.

Now why this happens, unfortunately I cannot tell. This needs to be investigated on the affected PC, or maybe someone who knows more about OneDrive could provide explanation.


Please sign in to leave a comment.