02-06-2019, 05:43 PM
Hi,
I would like to make a suggestion for an improvement of the Python API reference. What I tried is starting
RoboDK using explicit input values (although these are the default values):
It raises a type error stating that a concatenation of list and string is not possible (see attachment). Looking into robolink.py it becomes clear that the inputs ofrobodk_pathandargsare being concatenated. Whererobodk_pathis transformed to a list automatically,args是移交it is declared in the first place (see attachment), in this case as a string.
The correct version of the code above would be:
It is really not a big deal but it might be worth mentioning that command line arguments should be given as list:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html
Best Regards
David
I would like to make a suggestion for an improvement of the Python API reference. What I tried is starting
RoboDK using explicit input values (although these are the default values):
Code:
robodk_ip='localhost'
port=None
args=''
robodk_path='C:\\RoboDK\\bin\\RoboDK.exe'
RDK = Robolink(robodk_ip, port, args, robodk_path)
It raises a type error stating that a concatenation of list and string is not possible (see attachment). Looking into robolink.py it becomes clear that the inputs ofrobodk_pathandargsare being concatenated. Whererobodk_pathis transformed to a list automatically,args是移交it is declared in the first place (see attachment), in this case as a string.
The correct version of the code above would be:
Code:
robodk_ip='localhost'
port=None
args=[]
robodk_path='C:\\RoboDK\\bin\\RoboDK.exe'
RDK = Robolink(robodk_ip, port, args, robodk_path)
It is really not a big deal but it might be worth mentioning that command line arguments should be given as list:
//www.sinclairbody.com/doc/en/PythonAPI/robolink.html
Best Regards
David