pycharm 2022.2 destroys my interpreter and packages

INITIAL STATE:

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.


CURRENT STATE:


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.


CURRENT FIX:
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 !

5 comments
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 ( https://intellij-support.jetbrains.com/hc/en-us/community/posts/6870884026898-Pycharm-2022-2-upgrade-and-Docker-issues ) 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?

Thanks!

0
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 (https://youtrack.jetbrains.com/issue/PY-55338/Connection-to-console-or-debugger-is-refused-with-docker-interpreter-on-Linux) 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)

0
Comment actions Permalink

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

0
Comment actions Permalink

Hello Ak,

 

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

0
Comment actions Permalink

Hi,

I created an issue, if anyone wants to see how it evolved => https://youtrack.jetbrains.com/issue/PY-55755/20222-breaks-everything-when-using-SSH-remote-interpreter
Short story : I rollbacked to previous version 2021.2.4

0

Please sign in to leave a comment.