I think there is a bug, on Linux with the latest RoboDK version, in the RoboDK / bin folder, unable to run RoboDK
Only RoboDK-Start.sh is working.
My problem, with my python application, I have to run RoboDK. programmatically (I use RoboLink.py with the "Connect" function). With Windows OK, Linux not OK
Do you have solution please?
I propose a modification in the code. This allows you to use RoboDK-Start.sh
print('Starting %s\n' % self.APPLICATION_DIR)
#tstart = time.time()
from sys import platform as _platform
if (_platform == "linux" or _platform == "linux2") and os.path.splitext(command) == ".sh":
p = subprocess.Popen(command, shell=True, executable='/bin/bash', stdout=subprocess.PIPE)
p = subprocess.Popen(command, stdout=subprocess.PIPE)
line = str(p.stdout.readline().decode("utf-8")).strip()
if 'running' in line.lower():
#telapsed = time.time() - tstart
#print("RoboDK startup time: %.3f" % telapsed)
#with subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=1, universal_newlines=True) as p:
# self._ProcessID = p.pid
# for line in p.stdout:
# line_ok = line.strip()
# if 'running' in line_ok.lower():
# print("RoboDK is running")
# return #does not return!!
connected = 0
for i in range(2):
for port in range(self.PORT_START,self.PORT_END+1):
self.COM = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connected = self._is_connected()
if connected > 0:
connected = connected
if connected > 0:# if status is closed, try to open application
self.PORT = port
elif i == 0:
if self.IP != 'localhost':
command = [self.APPLICATION_DIR] + self.ARGUMENTS
#time.sleep(5) # wait for RoboDK to start and check network license.
raise Exception('Application path is not correct or could not start: ' + self.APPLICATION_DIR)
if connected > 0 and not self._verify_connection():
connected = 0
Thanks for your feed back, we really appreciate it.
Happy to see that you manage to fix the problem yourself.
Note that we will release a new version for Ubuntu next week with this among other corrections.