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

0
12 comments

Looks like this XML file got broken somehow. Could you back it up and then delete it? Has it helped?

0
Avatar
Permanently deleted user

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

0

Do you see anything related in your idea.log (Help | Show Log in...)?

0
Avatar
Permanently deleted user
0
Avatar
Permanently deleted user

Still happening with 2019.3.3. Sometimes after I reboot PC it's gone. But this bug comes back the next day :-(

0

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. 

0
Avatar
Permanently deleted user
Uploading...
File uploaded: pycharm-logs-20200317-105843.zip
Upload complete!


It's still happening :-(
And I don't think it's a Windows file permission error.

0

From the log

java.lang.RuntimeException: java.io.IOException: Cannot save C:\CloudTest\Hydra\.idea\workspace.xml.
Unable to open the file for writing.

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.

0
Avatar
Permanently deleted user
0

Well, the logs do show "access denied" exception

2018-03-13 09:34:27,136 [  35074]   WARN - j.util.io.SafeFileOutputStream - D:\Scripts\.idea\workspace.xml (Access is denied) 
java.io.FileNotFoundException: D:\Scripts\.idea\workspace.xml (Access is denied)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)


My money are on permission issue.

>Where did the "Safe writing" setting go?

Still there

0
Avatar
Permanently deleted user

>Still there

Why is it gone in 2020.2 EAP?

0

You're right, I think it was renamed to 'back up files before saving'

1

Please sign in to leave a comment.