RStudio project “cannot find the file specified” on R session restart

前端 未结 3 905
天命终不由人
天命终不由人 2021-01-17 23:16

I am getting strange and annoying behavior in one (yes, only one) of my RStudio projects. Whenever I restart the R session within this project, I can no longer save any of t

3条回答
  •  無奈伤痛
    2021-01-17 23:49

    I think @Jack Wasey is right: Google drive locks files during sync. This causes many issues with other programs as well. There are alternatives from companies that do file syncing for a living, such as dropbox, whose clients don't lock files. With google drive you only have the option to use selective sync and exclude every .Rproj.user folder. Once the RStudio's database is corrupted, moving the project out of the Google drive folder won't be enough - you will need to delete/rename it to have RStudio fix its database.

    Summary:

    1. Copy contents from all unsaved files to a temp file outside of RStudio (while clicking away the error message every other second)
    2. Quit Rstudio
    3. Pause Google drive syncing
    4. Rename (or move/delete) the hidden .Rproj.user folder in your project
    5. Reopen the project in Rstudio
    6. Exclude the new .Rproj.user folder from syncing with Google drive (Preferences -> sync only these folders)
    7. Remember that Google drive is free / Become an awesome google developer and fix the issue once and for all

提交回复
热议问题