pycharm 2022.2 destroys my interpreter and packages


pycharm2021.2 on Windows.
For each project, a remote interpreter is configured with SSH to my Windows Subsystem Linux.
Inside WSL, pyenv installed, and all my python projects are managed by poetry ; running "poetry install" installs venv inside the project.


After installting pycharm 2022.2, each time I open a project, it erases the used pyenv python3.9 binary file and all libraries inside .venv (all .py files but none of .pyc cache files), files are all there but empty (0 byte). See screenshots.
Note that, all other python versions inside pyenv are not affected, only the one used by the project opened with pycharm 2022.2 for the first time.

After reinstall the pyenv version (pyenv uninstall 3.9.5 ; pyenv install 3.9.5) and the .venv (rm -rf .venv ; poetry install), then reconfiguring the deployment (SFTP) part (because I suspect it), it's ok.

I would like to avoid to reinstall/reconfigure for each reopened project, so I'd like to understand what's happening :/

Thanks in advance !

Comment actions Permalink

I am having the exact same problem, all files (if ssh interpreter is configured) get saved with 0 bytes.  

I found this workaround ( ) to solve this issue too, but I am not sure what is the cause or if the solution applied is affecting other features.

Do you have any other solution?


Comment actions Permalink

Thanks for your reply. Back from my holidays, I have an update about my fix : it fixes everything inside the WSL, but pycharm still cannot connect to my SSH remote interpreter, like it happens to people in your linked post.

Applying Antonina Belianskaya's workaround does not work for me.
the related issue ( is similar to mine but not exactly same thing : my case is SSH instead of Docker interpreter, and the fix does not work for me. BUT I have the same global error as Md Nazrul Islam : "Connection to Python debugger failed: Socket closed", except I don't have the same stack of error :

Actions I have in head so far :

- creating an official issue
- deleting .idea folder in order to flush the project and reopen it.
- rollback to previous version (but how ?) or reinstall a previous version (but I may lose my custom configurations)

Comment actions Permalink

Oh, and, after many retries, my case is worse, see my deployment state now...

Comment actions Permalink

Hello Ak,


Please try to: close IDE, delete .idea directory inside the project root and reopen the project.  Will it help? 

Comment actions Permalink


I created an issue, if anyone wants to see how it evolved =>
Short story : I rollbacked to previous version 2021.2.4


Please sign in to leave a comment.