Remote connection to Raspberry Pi
I have set up a remote server for my Raspberry Pi. I have installed the pydevd-pycharm on the Raspberry Pi. I have added the python instructions to the python file for this. When I run the python file I get the following:
Traceback (most recent call last):
File "/var/www/lab_app/lib/python3.8/site-packages/_pydevd_bundle/pydevd_comm.py", line 316, in _on_run
cmd_id = int(args[0])
ValueError: invalid literal for int() with base 10: 'SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2\r'
Can't process net command: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
What am I doing wrong?
Please sign in to leave a comment.
Hi,
Your problem seems to be the same as https://youtrack.jetbrains.com/issue/PY-24507
Any chance you could try using SSH interpreter for remote debugging instead of Remote Debug Server? https://www.jetbrains.com/help/pycharm/remote-debugging-with-product.html
I'm wondering if it's somehow related to the pydevd-pycharm.
Btw, does the issue reproduce with another interpreter? For example, create a virtual environment, install pydevd-pycharm and try again.
I'm trying to set up another virtual environment, but I don't appear to be getting the paths set up correctly. PyCharm keeps putting the python file into the / directory on the Raspberry Pi. I thought I set the file map to be put into /var/www/test directory. Where is this supposed to be set? Also, I see a lot of files being uploaded to the Raspberry Pi. I only want the python file to be uploaded to it since I already have the virtual environment there.
I am trying to understand the instructions for setting up for remote that you have on your web site but it appears I haven't.
Also, I installed what is indicated as the pydevd-pycharm version shown when I set up a Python Debug Server, version 202.6948.78. But when I selected the remote Python interpreter after installing pydevd-pycharm, a later version is indicated for it, 202.7319.37. I thought this means that there must be an updated version for PyCharm. But there isn't any when I check for a PyCharm update.
I am an embedded C programmer. I'm trying to learn Python for an application. Your tool was recommended to me. It has a lot of features I;m sure but it's learning which features I need is where I am having issues.
I set up another virtual enviroment and got the same results as stated in the first part of this thread.