Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Broken Pipe Error during remote connection to RoboDK API server

#1
Question 
Hi,

I am running RoboDK on my host machine (Windows 10) and trying to run a python script inside a Linux VM. I tried the following code:
    
Code:
RDK = robolink.Robolink(robodk_ip="172.27.128.1")
item = RDK.Item('base')

When I run this, I get the following error:

Code:
    item = RDK.Item('base') 
File "/home/rshanor/venvs/lib/python3.10/site-packages/robodk/robolink.py", line 1394, in Item
    self._send_line(command)
  File "/home/rshanor/venvs/lib/python3.10/site-packages/robodk/robolink.py", line 801, in _send_line
    self.COM.send(bytes(string + '\n', 'utf-8'))  # Python 3.x only
BrokenPipeError: [Errno 32] Broken pipe

I do not think the issue is firewall related. Before opening the correct ports, the above code gives a different TimeoutError. Thanks for the help!
#2
Did you activate the option to enable the external API?

Could you try a different port? The default port is 20500 but there could be another process is using this port and the API started in a different port.

You'll find these settings here:
  • Tools-Options
  • Select Other tab
#3
Did you solve the problem? I'm facing with the same. I have installed RDK on windows and i'm trying to use Python API using Visual Studio on WSL. I ve abilitate the Python API as well in the option tab using the GUI. When i installed RDK on Linux machine i was able to open it directly and load the cell. Istead now i have to open RDK, load the cell using GUI and than i can communicate with the env. How i can solve? I would like to open RDK and connect to it directly from API. Is not possibile with my configuration?

Code:
env = robodk.robolink.Robolink(robodk_path='/mnt/c/RoboDK/bin/RoboDK.exe', robodk_ip="192.168.1.19", port:20500)
env.AddFile(filename='./ViperCell.rdk')
Quote:Traceback (most recent call last):
  File "/mnt/c/Users/giuli/Desktop/University/Research/UNILab/WAAM/try.py", line 12, in <module>
    env.AddFile(filename='./ViperCell.rdk')
  File "/home/giulio/anaconda3/envs/research/lib/python3.7/site-packages/robodk/robolink.py", line 1914, in AddFile
    self._send_line(command)
  File "/home/giulio/anaconda3/envs/research/lib/python3.7/site-packages/robodk/robolink.py", line 877, in _send_line
    self.COM.send(bytes(string + '\n', 'utf-8'))  # Python 3.x only
socket.timeout: timed out
#4
Do you see any error messages in RoboDK?

Can you try providing the full path of the RDK file you are trying to load? If you provide a relative path it should usually be with respect to the RoboDK binary.
  




Users browsing this thread:
1 Guest(s)