Python error when running



I’m trying to run the Demo in Python 2.7 as well as 3.6 on Windows 64 bit. is running fine, but if I run this error pops up:

api = dType.load()

  File "", line 459, in load
return CDLL("DobotDll.dll",  RTLD_GLOBAL)

  File "C:\Python\lib\ctypes\", line 362, in __init__
self._handle = _dlopen(self._name, mode)

WindowsError: [Error 193] %1 is not a valid Win32 application

Do you have any recommendations on how to solve this issue? I checked all software involved for the version and 64 bit.

Thank you in advance!


Please email to to get technical support, thanks


Same thing happen to me and to fix it download the python 3.5.0 x86 version
( [Windows x86 executable installer])


So this particularly is the problem. The software involved (e.g. Anaconda) should be 32Bit.
Also, notice that Python Demo can only run at Python 3.5. I recently got exact the same issue, so here’s my way to solve it:

  1. Reinstall all software needed with 32-Bit version
  2. Create a virtual environment using
    conda create - n {your envs name here} python=3.5 anaconda
  3. Install all the other packages needed, if necessary, by pip.

Connect your Dobot, wait for the green LED to light up and you should be ready to go!


I am using Pycharm with python 3.5.

I want to use dobot magician in a project where I have to sniff network packets with scapy.

Without scapy everything works fine.

But when I import anything from scapy (for example " from scapy.all import sniff") dobot magician stops working with a message:

Traceback (most recent call last):
File “E:/DelayLipSyncDAQ_V10-Pyt_35-32-Shark-Brez-MetricServer Database/”, line 217, in
File “E:\DelayLipSyncDAQ_V10-Pyt_35-32-Shark-Brez-MetricServer Database\”, line 385, in connect_dobot
self.DobotM2 = dType.load()
File “E:\DelayLipSyncDAQ_V10-Pyt_35-32-Shark-Brez-MetricServer Database\”, line 458, in load
return CDLL(“DobotDll.dll”, RTLD_GLOBAL)
File “C:\Program Files (x86)\Python35-32\lib\”, line 351, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

I would really appreciate any help how to use dobot magician with scapy.

Greetings from Slovenia


Just to add: python 3.5 and pycharm are both 32bit versions.


I have also faced the same python error when running the robot control so please help me to fix it. I have also checked chrome keeps crashing where I got a bit solution regarding this.


I am running into this error “OSError: [WinError 193] %1 is not a valid Win32 application” in one variant of the code and not the other. I am using Pycharm 2019.1 and both are using the same python37.exe one fails and the other does not.
They have the same code line artist = dType.load(), (the name does not matter) and one runs and the other has the error???


What I found was not what should not be happening. What corrected the problem with this error “OSError: [WinError 193] %1 is not a valid Win32 application” is that inside the function call “dType.load()” code needs the import statement, which is not required for my code to work, “from PyQt import QtCore, QtGui, QtWidgets” in my code.