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 pygaze_init.py. 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

Comments

  • edited 9:06PM

    Hi,

    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'?

    Thanks!

    Edwin

  • edited 9:06PM

    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('192.168.2.1'), c_int(4444), c_char_p('192.168.2.0'), 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
    
    Traceback:
      File "dist\libqtopensesame\runners\inprocess_runner.py", line 36, in execute
      File "dist\libopensesame\experiment.py", line 344, in run
      File "dist\libopensesame\sequence.py", line 47, in run
      File "C:\Program Files\OpenSesame\plugins\pygaze_init\pygaze_init.py", line 198, in run
      File "C:\Program Files\OpenSesame\pygaze\eyetracker.py", line 77, in __init__
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\libsmi.py", line 47, in <module>
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\iViewXAPI.py", 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 9:06PM

    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.

    Cheers!
    Sebastiaan

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

  • edited 9:06PM

    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 9:06PM

    Thanks for sharing!

  • edited 9:06PM

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

  • edited February 2017

    Hi,
    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\inline_script.py", line 102, in run
        self.experiment.python_workspace._exec(self.crun)
      File "C:\Program Files\OpenSesame\lib\site-packages\libopensesame\python_workspace.py", line 161, in _exec
        exec(bytecode, self._globals)
      File "<string>", line 2, in <module>
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\libsmi.py", line 42, in <module>
        from iViewXAPI import  *
      File "C:\Program Files\OpenSesame\pygaze\_eyetracker\iViewXAPI.py", line 74, in <module>
        iViewXAPI = windll.LoadLibrary("iViewXAPI.dll")
      File "C:\Program Files\OpenSesame\lib\ctypes\__init__.py", line 440, in LoadLibrary
        return self._dlltype(name)
      File "C:\Program Files\OpenSesame\lib\ctypes\__init__.py", 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.
    Jessica

  • @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.
    cogsci.nl/smathot

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

  • @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.