Unexpected output on remote host

已回答

I run the following program on debug mode :

from multiprocessing.pool import Pool


def foo(i):
pass


with Pool(processes=32) as pool:
list(pool.imap(foo, range(10000)))

If I run it with my local interpreter, I have not problem :

/usr/bin/python3.7 /snap/pycharm-professional/183/plugins/python/helpers/pydev/pydevd.py --cmd-line --multiproc --qt-support=auto --client 127.0.0.1 --port 39171 --file /home/rodolphe/debug.py
pydev debugger: process 26975 is connecting
Connected to pydev debugger (build 193.6494.30)
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 3.7.5 (default, Nov 20 2019, 09:21:52)

But if I run it on my remote interpreter, I have the following (and I would like to avoid printing out the "Expected: %s to exist. Nonetype: None") :

ssh://rodolphe@my_remote_host.com:2108/usr/bin/python3.7 -u /home/rodolphe/.pycharm_helpers/pydev/pydevd.py --cmd-line --multiproc --qt-support=auto --client 0.0.0.0 --port 41006 --file /home/rodolphe/debug.py
pydev debugger: process 5775 is connecting
Connected to pydev debugger (build 193.6494.30)
Expected: %s to exist.
NoneType: None
Expected: %s to exist.
NoneType: None
Expected: %s to exist.
NoneType: None
Expected: %s to exist.
NoneType: None
Expected: %s to exist.
NoneType: None
Expected: %s to exist.
NoneType: None
import sys; print('Python %s on %s' % (sys.version, sys.platform))
Python 3.7.6 (default, Dec 19 2019, 23:50:13)
6

I also have this problem when I want to debug remotely and it is slowing me down a lot since when that message appears the commands that I execute in the debug console within a breakpoint get stuck. I updated immediately when I saw the update available today, but unfortunately the problem is still there, it just presents in a different way. Now I see the message:

Expected: /home/my_user/.pycharm_helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so to exist.

I have tried removing the .pycharm_helpers folder in the remote machine but the problem is still there. For the moment I am running in normal mode (not debug) and placing breakpoint() in the code, but it is not the same thing as real breakpoints. Please find a solution.

 

In my case the debugger works fine in the beginning but when this piece of code is executed: 

for data in validation_loaders:
pass

then the above mentioned message appears and I can't even type 2+2 in the debug prompt. 

Validation loader is a torch data loader.

3

A similar problem when running on the most recent version of PyCharm. Using the remote interpreter on Ubuntu and connecting to it via SSH using PyCharm's functionality. Removing the folder doesn't help. I cannot debug anything.

Expected: ~/.pycharm_helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so to exist.
2

In the meantime, I solved it by:

```
pip install -U pydevd-pycharm
cd ~/.pycharm_helpers/pydev
ln -s <path_to_python_site_packages>/pydevd_attach_to_process
```

Now my pydevd doesn't complain, no more `Expected: %s to exist`, no more `Expected: /home/my_user/.pycharm_helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so to exist`, etc. :)

P.S.: I'm on PyCharms 2020.1

1

Carlos Ruiz Dominguez not working :( I have just tried your method. In my case the pydevd_attach_to_process folder was in ~/miniconda3/envs/my_env/.

By creating the symlink the PyCharm doesn't show me the error anymore, but if I set a breakpoint I can't see variables and execute commands in the debug console.

1

Same issue here after updating to 2019.3.3 (downloaded and installed yesterday).

It was failing my code (that was working before) with:

undefined symbol: AttachDebuggerTracing

I've removed the .pycharm_helpers  folder in the remote server and now what I get is the:

Expected: %s to exist.
NoneType: None
0

I have exactly the same issue.

0

Same problem here. I suspect there is something to do with mapping

0

I've updated to latest version of Pycharm and still happening. Is anyone going to fix this???

0

The fix for https://youtrack.jetbrains.com/issue/PY-39307 will be included in the next release (2020.1)

0

Sorry, I understood it was fixed already in the current version. Do you have any estimate on the release date of 2020.1 release? I rather use an stable version and not a EAP version.

Thanks!

0

The planned 2020.1 release date is 2020-04-08

0

@Luca Marconato

Are you using remote debugging with SSH interpreter, or remote debug server? 

If the latter, do you have the latest version of pydevd-pycharm package? Please try `pip install -U pydevd-pycharm` , does the issue still reproduce afterwards?

0

I experience the exact same thing a Luca Marconato, the debugger is completely useless at some point and unresponsive. It's not even possible to continue the program.

I guess I'm using the ssh interpreter as the first line of the debugger states: "ssh://..."

0

Andrey Resler

I am remote debugging with a SSH interpreter pointing to the "<my_conda_folder>/envs/<my_env>/bin/python" executable. I don't know how to do debug with a remote debug server. I have tried anyway to install the package you mentioned in the server's conda environment and nothing changes (but probably nothing would have supposed to change).

0

Everyone who's on PyCharm 2020.1 and affected by this issue, please go to the issue https://youtrack.jetbrains.com/issue/PY-41820

And attach:

- Logs from **Help | Collect Logs and Diagnostic Data** after reproducing the issue

- Does the issue reproduce with any code? If it's code specific - provide code sample

The issue will close automatically in 30 days if no info is provided.

0

same here, any solution?

0

请先登录再写评论。