Magician DemoV2.0 - Python + Mac


#1

Hello,

I am trying to control my Dobot Magician from my Mac using Python. I was attempting to use the DobotDemoForPython contained in DobotDemoV2.0 but I get the following error:

DobotDemoForPython nicka$ ./DobotControl.py
Traceback (most recent call last):
File “./DobotControl.py”, line 6, in
api = dType.load()
File “/Users/nicholas.akiona/Documents/DoBot/DobotDemoV2.0/DobotDemoForPython/DobotDllType.py”, line 422, in load
return cdll.DobotDll
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py”, line 435, in getattr
dll = self._dlltype(name)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/init.py”, line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(DobotDll, 6): image not found

How do I fix this error? Any other recommendations for how to easily control my Dobot Magician from my Macbook using python?

I am also open to developing in C++ if that is easier.

Thanks for your help.


#2

You can try python3.5 32-bit version under linux OS, version2.7 is not supported.


#3

Okay. I tried this out running parallels for linux OS (64-bit). I still can’t run the python demo successfully and get the following error:

parallels@ubuntu:~/Documents/DobotDemoV2.0/DobotDemoForPython$ ./DobotControl.py
./DobotControl.py: line 4: syntax error near unexpected token (' ./DobotControl.py: line 4:api = dType.load()’

I should be using python3.5 so I’m not sure what the problem is now. It seems like it could be a file encoding error. Thoughts?


#4

Hi,

If you want to code on Linux, the library is only available for Linux 32bits.
Then, you need some Qt library like QT5core.so etc
Maybe you can install Qt to avoid the problem of dType.load()

And, I use python2.7 on ubuntu16.04 32bits and all works fine

I think the problem is same on macOS, maybe you open the terminal and call the command
ldd *
Check if all your libraries can find the dependencies


#5

I’m having the same issue under OSX.

Tried on linux 64 bits, any chance of having the driver compiled for linux 64-bit? thanks