Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] problem loading iViewXAPI.dll

edited February 2015 in PyGaze

We are encountering an error on running The traceback indicates that there is a problem loading the iViewXAPI.dll - "WindowsError: [Error 193] %1 is not a valid Win32 application"

We know the module works because the module runs under pure PsychoPy, but this doesn't use PyGaze. Loading the module from the command line works, and the error only occurs within Openseasame when we add the pygaze to the experiment and when we try to manually load the module from the debug prompt. In both cases, we receive the above error. We've also ruled out that this is simply a path issue.

Very keen to get this up and running and any tips would be most appreciated.

We're running iViewX 2.8 build 26
iViewX SDK v3.6
OS: Windows 7
Eyetracking unit: SMI RED 250
Dual system setup connected via ethernet


  • edited 6:42AM


    Is iViewXAPI.dll in the pygaze\_eyetracker directory? If it isn't, please do copy it in there and try again.

    I'm not sure why it would load via the command line and not via OpenSesame. What have you typed in exactly, to try to load it? Also, if you try the examples (e.g. the slideshow that come with the PyGaze package, do they run when you set the TRACKERTYPE to 'smi'?



  • edited 6:42AM

    Hi again,

    We have ensured that the iViewXAPI.dll is in the pygaze\_eyetracker directory and that the TRACKERTYPE is set to 'smi'. Testing Pygaze externally (from within Psychopy) ran without problem, after we modified the connection settings (as we're using a dual system setup).

    # from: 
    res = iViewXAPI.iV_Connect(
        c_char_p(ip), c_int(sendport), c_char_p(ip), c_int(receiveport)
    # to: 
    res = iViewXAPI.iV_Connect(
        c_char_p(''), c_int(4444), c_char_p(''), c_int(5555)

    However, when we try to run the most basic pygaze experiment within opensesame, we get the following error:

    Unexpected error
    line: 365
    exception message: 
    exception type: WindowsError
      File "dist\libqtopensesame\runners\", line 36, in execute
      File "dist\libopensesame\", line 344, in run
      File "dist\libopensesame\", line 47, in run
      File "C:\Program Files\OpenSesame\plugins\pygaze_init\", line 198, in run
      File "C:\Program Files\OpenSesame\pygaze\", line 77, in __init__
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\", line 47, in <module>
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\", line 75, in <module>
      File "ctypes\__init__.pyc", line 443, in LoadLibrary
      File "ctypes\__init__.pyc", line 365, in __init__
    WindowsError: [Error 193] %1 ist keine zulässige Win32-Anwendung

    At this point, we're stumped...any ideas?

    Thanks again for your help

  • edited 6:42AM

    One thing that comes to mind is that this DLL may not be compatible with the Python environment that is included with OpenSesame. For example, did you use a 64 bit python environment when testing PyGaze externally? Or are there any other notable differences between the two Python environments? You can type modules () in the OpenSesame debug window to get a list of all relevant versions.


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • edited 6:42AM

    I've had the same problem. Deleting the file inpout32.dll from the OpenSesame directory (which seems to be corrupted) solved the problem for me and I was able to load the dll.

  • edited 6:42AM

    Thanks for sharing!

  • edited 6:42AM

    Many thanks for this. That seems to have solved the problem.

  • edited February 2017

    If the iViewXAPI.dll is not in the _eyetracker, how is it possible to download it ?
    I am trying to connect Opensesame 3.1.2 to an SMI eyetracker, and while my experiment worked fine with Eyelink 1000, it doesn't work with the SMI (a RED 500).
    The error I get is the following :

      File "C:\Program Files\OpenSesame\lib\site-packages\libopensesame\", line 102, in run
      File "C:\Program Files\OpenSesame\lib\site-packages\libopensesame\", line 161, in _exec
        exec(bytecode, self._globals)
      File "<string>", line 2, in <module>
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\", line 42, in <module>
        from iViewXAPI import  *
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\", line 74, in <module>
        iViewXAPI = windll.LoadLibrary("iViewXAPI.dll")
      File "C:\Program Files\OpenSesame\lib\ctypes\", line 440, in LoadLibrary
        return self._dlltype(name)
      File "C:\Program Files\OpenSesame\lib\ctypes\", line 362, in __init__
        self._handle = _dlopen(self._name, mode)
    WindowsError: [Error 126] The specified module could not be found

    Could someone help me with issue ? Please tell me if further details are required.

  • @sebastiaan I am sorry I posted twice the same question. I did so because I thought my comment would not be seen here because the discussion is marked as "solved". Do you think I can have an answer here ?

  • The missing file (iViewXAPI.dll) is part of the iViewX SDK, the software-development kit provided by SMI. You probably received the SDK with your SMI device, but if you can request it from here:

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • @sebastiaan Thanks a lot for your answer, it is now perfectly working !
    Best regards

  • @Edwin "Is iViewXAPI.dll in the pygaze_eyetracker directory? If it isn't, please do copy it in there and try again."
    I don't have that dll and I can't find it anywhere. Do you know where I can download it? or maybe you could upload it?

  • As @sebastiaan mentioned two comments up, the DLL is part of the SMI SDK. It's proprietary, so I'm afraid I can't upload it.

Sign In or Register to comment.