WSL2 - Cannot load settings from file

I'm currently using PyCharm with a python 3.6 project running in WSL2.

Very often (as in 9 times out of 10) when I restart my machine and re-open PyCharm I get the following error:

Load Settings
Cannot load settings from file '\\wsl$\Ubuntu-20.04\home\ubuntu\projects\<project_dir>\idea\workspace.xml': content truncated
File content will be recreated

This is really annoying as I then have to set up my run configurations and configuration templates again  (interpreter settings are fine)

Any suggestions on how to fix?

PyCharm 2021.2.2 (Professional Edition)
Build #PY-212.5284.44, built on September 14, 2021
Runtime version: 11.0.12+7-b1504.28 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2002M
Cores: 8
Registry: ide.intellij.laf.enable.animation=true, debugger.watches.in.variables=false, debugger.mayBringFrameToFrontOnBreakpoint=false, ide.balloon.shadow.size=0, git.allow.wsl1.executables=true
Non-Bundled Plugins: zielu.gittoolbox (212.7.11), com.mallowigi.idea (16.0)

Edition Windows 10 Business
Version 21H1
Installed on ‎15/‎04/‎2021
OS build 19043.1266
Experience Windows Feature Experience Pack 120.2212.3920.0

0
3 comments

Hi, 

Please try to remove `.idea` directory from the project root and re-open the project. Does the issue still reproduce?

1

Hi Andrey,

Yeap, I have cleared my idea directory a couple of times and it has happened again.

To be clear, when just re-opening the project everything is perfectly fine. It happens after restarting the machine and even then it only sometimes causes the issue. It's annoyingly inconsistent.

0

Please sign in to leave a comment.