Dobot Demo for python


#1

Hello, i am trying to use the Second development python demo, so i downloaded the DobotDemoForPython and it didn’t run it. The error that python shows is

Traceback (most recent call last):

File “/home/chronobreak/Desktop/DobotDemoForPython/DobotControl.py”, line 10, in <module>

api = dType.load()

File “/home/chronobreak/Desktop/DobotDemoForPython/DobotDllType.py”, line 466, in load

return cdll.loadLibrary("libDobotDll.so")

File “/usr/lib/python3.7/ctypes/init.py”, line 426, in getattr

dll = self._dlltype(name)

File “/usr/lib/python3.7/ctypes/init.py”, line 356, in init

self._handle = _dlopen(self._name, mode)

OSError: loadLibrary: cannot open shared object file: No such file or directory

We followed the manual instructions step by step, even adding the environment variable to the bash.profile, adding the Dobot DLLs directory to the running directory of python.

In addition, we are using python 3.7.3.

Thank you very much in advanced


#2

There is a typo in the demo code. The name of the function call should be “LoadLibrary” not “loadLibrary”. So if you change this line of code:

return cdll.loadLibrary("libDobotDll.so")

to:

return cdll.LoadLibrary("libDobotDll.so")

It should then work.