PyCharm fails to save files and replacing them with empty ones
Since 2019.3 PyCham on my system is sometimes unable to save files:
09:23 Load Settings
Cannot load settings from file 'C:\CloudTest\Hydra\.idea\workspace.xml': content truncated
File content will be recreated
09:23 Unable to save settings: Failed to save settings. Please restart PyCharm
Please sign in to leave a comment.
Looks like this XML file got broken somehow. Could you back it up and then delete it? Has it helped?
Has not helped, now I'm getting:
09:43 Load Settings
Cannot load settings from file 'C:\Users\kig0pkt12\.PyCharmCE2019.3\config\options\usage.statistics.xml': content truncated
File content will be recreated
09:43 Load Settings
Cannot load settings from file 'C:\Users\kig0pkt12\.PyCharmCE2019.3\config\options\updates.xml': content truncated
File content will be recreated
09:43 Load Settings
Cannot load settings from file 'C:\Users\kig0pkt12\.PyCharmCE2019.3\config\options\recentProjectDirectories.xml': content truncated
File content will be recreated
09:43 Load Settings
Cannot load settings from file 'C:\Users\kig0pkt12\.PyCharmCE2019.3\config\options\packages.xml': content truncated
File content will be recreated
09:44 Unable to save settings: Failed to save settings. Please restart PyCharm
09:44 Unable to save settings: Failed to save settings. Please restart PyCharm
09:44 Load Settings
Cannot load settings from file 'C:\CloudTest\Hydra\.idea\workspace.xml': content truncated
File content will be recreated
Also deleting the whole .idea folder did not help
Do you see anything related in your idea.log (Help | Show Log in...)?
https://pastebin.com/cU3vpkDW
Still happening with 2019.3.3. Sometimes after I reboot PC it's gone. But this bug comes back the next day :-(
Hi,
Please upload your logs folder zipped from ***Help | Compress Logs and Show in…*** to the FTP
https://uploads.services.jetbrains.com/ and please let me know the filename.
It's still happening :-(
And I don't think it's a Windows file permission error.
From the log
Please verify that workspace.xml exist on the specified path. If it does, it's most likely a case of permission issues. Your user home is in non-default path, which is likely the source of the issue. Try creating a new Windows user with home in default path (which is c:\users) and run PyCharm from there.
If C:\CloudTest is a virtual folder, it may not be accessible by Java.
Sadly this is still happening.
Look like the same problem: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000111590-Cannot-save-files
Also: https://stackoverflow.com/questions/49244375/pycharm-cannot-save-files
Where did the "Safe writing" setting go?
Well, the logs do show "access denied" exception
My money are on permission issue.
>Where did the "Safe writing" setting go?
Still there
>Still there
Why is it gone in 2020.2 EAP?
You're right, I think it was renamed to 'back up files before saving'