When "Uploading PyCharm Helpers", you ignore TMPDIR

For the last 4-5 months, PyCharm is broken for me for remote dev, and I figured out why.

 

When syncing with a remote interpreter, PyCharm "Uuploads" helpers, whatever that means.
It ignores my local definition of TMPDIR, and instead touches `/tmp`.

 My server does not allow writing to tmp, so I see:

```

Message from root@nlp17 on <no tty> at 17:44 ...
Please do not write files to /tmp directory, we deleted the file /tmp/pip-unpack-p4w4pl82/setuptools-67.3.2-py3-none-any.whl

Message from root@nlp17 on <no tty> at 17:44 ...
Please do not write files to /tmp directory, we deleted the file /tmp/pip-unpack-salyugea/pip-23.0.1-py3-none-any.whl

Message from root@nlp17 on <no tty> at 17:44 ...
Please do not write files to /tmp directory, we deleted the file /tmp/FonMAETIXj/python3.9.zip

Message from root@nlp17 on <no tty> at 17:44 ...
Please do not write files to /tmp directory, we deleted the file /tmp/FonMAETIXj/site-packages.zip

```


Please use MY tmp directory using TMPDIR, not just `/tmp` 

0
6 comments

Please upload logs from both sides, collected according to https://www.jetbrains.com/help/idea/2022.2/remote-development-troubleshooting.html#support, to https://uploads.jetbrains.com and provide us with the UID of the archive uploaded. 

0

1. Server logs: There is no `~/.cache/JetBrains/`, the only logs I have are in the body of the issue above.

2. Client logs Upload id: 2023_02_23_qDSeqf4PGp3EvtpCSfEnN7 (file: pycharm-logs-20230223-09225912732655180227380141.zip)

The fix, in my eyes, is: whenever you do `/tmp`, use `TMPDIR` instead, and `/tmp` as default.

0

Current fix: Revert to Pycharm 2021

Using PyCharm 2021, you don't zip the helpers, and instead, download them one by one which is slow, but at least it works

0

This seems to still be an isuse.

0

I managed to fix this error in my setup, using PyCharm 2023.2.1 Professional Edition, by modifying my .bashrc file on the server side (not on the local machine running PyCharm). Just had to add two lines:

export TMPDIR=/tmp/${USER}
mkdir -p $TMPDIR

Making the TMPDIR user-dependent makes it a bit future-proof to sharing with other users on the same system too.

Hope this helps.

0

Please sign in to leave a comment.