psychopy.org | Reference | Downloads | Github

Select_tracker demo for SMI Eyetracker not working in version 1.84.2, worked in 1.82.01

eyetracking

#1

I ran an experiment about a year ago with the SMI eyetracker on psychopy version 1.82.0. A colleague of mine used my code in version 1.84.2 and it gave her an error. When analyzing the problem I found that even the demo (select_tracker) does not work in version 1.84.2. Ip addresses are set correctly and the demo runs flawlessly in version 1.82.0. What has changed?

The error I get in version 1.84.2 is below. Is it the yaml-file? It looks very similar to me in both versions. And as I said the ip addresses were adjusted correctly, so this is not the source of the error.

For now we will simply use the old version, but this is obviously not optimal. I’ll be glad if anyone has an idea how to fix this. Thank you!

Running: C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\demos\coder\iohub\eyetracking\selectTracker\run.py

Error during device creation …
<class ‘yaml.scanner.ScannerError’>
ScannerError()
[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\server.py”, line 591, in createNewMonitoredDevice\n device_instance_and_config=self.addDeviceToMonitor(device_class_name,deviceConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\server.py”, line 750, in addDeviceToMonitor\n _dclass,default_device_config=load(file(dconfigPath,‘r’), Loader=Loader).popitem()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\init.py”, line 71, in load\n return loader.get_single_data()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\constructor.py”, line 37, in get_single_data\n node = self.get_single_node()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 36, in get_single_node\n document = self.compose_document()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 55, in compose_document\n node = self.compose_node(None, None)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 84, in compose_node\n node = self.compose_mapping_node(anchor)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 133, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 84, in compose_node\n node = self.compose_mapping_node(anchor)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 133, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 84, in compose_node\n node = self.compose_mapping_node(anchor)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\composer.py”, line 127, in compose_mapping_node\n while not self.check_event(MappingEndEvent):\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\parser.py”, line 98, in check_event\n self.current_event = self.state()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\parser.py”, line 428, in parse_block_mapping_key\n if self.check_token(KeyToken):\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\scanner.py”, line 116, in check_token\n self.fetch_more_tokens()\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\yaml\scanner.py”, line 257, in fetch_more_tokens\n % ch.encode(‘utf-8’), self.get_mark())\n’]
Error during device creation …
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)

[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\server.py”, line 520, in init\n self.createNewMonitoredDevice(device_class_name,deviceConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\server.py”, line 603, in createNewMonitoredDevice\n raise ioHubError(“Error during device creation …”)\n’]
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)

[’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\launchHubProcess.py”, line 35, in run\n s = ioServer(rootScriptPathDir, ioHubConfig)\n’,
’ File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\server.py”, line 524, in init\n raise ioHubError(“Error during device creation …”)\n’]
Closing remaining open files:C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\demos\coder\iohub\eyetracking\selectTracker\events.hdf5…done
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\demos\coder\iohub\eyetracking\selectTracker\run.py”, line 284, in
main(configurationDirectory)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\demos\coder\iohub\eyetracking\selectTracker\run.py”, line 273, in main
runtime=ExperimentRuntime(configurationDirectory, “experiment_config.yaml”)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\client_init_.py”, line 1603, in init
self.hub = self.initalizeConfiguration()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\client_init
.py", line 1855, in initalizeConfiguration
self.hub = ioHubConnection(None, ioHubConfigAbsPath)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\client_init
.py", line 285, in init
self.iohub_status = self.startServer(ioHubConfig, ioHubConfigAbsPath)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\client_init
.py", line 943, in _startServer
isDataAvail=self.serverStdOutHasData()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\iohub\client_init
.py", line 1052, in _serverStdOutHasData
raise e
pywintypes.error: (109, ‘PeekNamedPipe’, ‘Die Pipe wurde beendet.’)


#2

Hi,

I have the exact same issue, but in Psychopy version 1.82.1. I use Iohub to communicate with an eyetracker. When using the same iohub code and a Yaml file for the eyetribe eyetracker there are no issues. When I replaced the Yaml file with a file to describe the SMI RedM eyetracker I run into the same issue as you describe. Have you found a solution?


#3

Hi Hanne,

you could use version 1.82.0, it worked for me. My colleague switched to the SMI SDK, which worked also with a higher version. There seems to be an example experiment.

Anyway, it would be nice to have a solution for this. At least there is some evidence that something changed from version 1.82.0 to 1.82.1. If you can confirm that it works for you with 1.82.0, this would probably help the developers.

Can anyone else reproduce this problem with the two versions?


#4

Hi,

I tried installing 1.82.0, but it doesn’t seem to be available anymore.

I tried digging into the error more using the debugger. For some reason the first error is raised just before importing a module called msvcrt on line 1035 in the init.py file (ioHub/client.py). On the line above the import a statement checking whether my system is a 32 bit system evaluates as true. Immediately after that the error appears.

This is the error that appears:

Error during device creation …
<type ‘exceptions.TypeError’>
TypeError("‘NoneType’ object has no attribute ‘getitem’",)
[’ File “C:\Python27\lib\site-packages\psychopy\iohub\server.py”, line 591, in createNewMonitoredDevice\n device_instance_and_config=self.addDeviceToMonitor(device_class_name,deviceConfig)\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\server.py”, line 781, in addDeviceToMonitor\n deviceInstance=DeviceClass(dconfig=device_config)\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\devices\display\init.py”, line 62, in init\n self._addRuntimeInfoToDisplayConfig()\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\devices\display\init.py”, line 506, in _addRuntimeInfoToDisplayConfig\n self._createPsychopyCalibrationFile()\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\devices\display\init.py”, line 660, in _createPsychopyCalibrationFile\n psychoMonitor.setSizePix(list(self.getPixelResolution()))\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\devices\display\init.py”, line 193, in getPixelResolution\n return self.getConfiguration()[‘runtime_info’][‘pixel_resolution’]\n’]
Error during device creation …
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)

[’ File “C:\Python27\lib\site-packages\psychopy\iohub\server.py”, line 520, in init\n self.createNewMonitoredDevice(device_class_name,deviceConfig)\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\server.py”, line 603, in createNewMonitoredDevice\n raise ioHubError(“Error during device creation …”)\n’]
<class ‘psychopy.iohub.util.exception_tools.ioHubError’>
ioHubError:
Args: (‘Error during device creation …’,)

[’ File “C:\Python27\lib\site-packages\psychopy\iohub\launchHubProcess.py”, line 35, in run\n s = ioServer(rootScriptPathDir, ioHubConfig)\n’,
’ File “C:\Python27\lib\site-packages\psychopy\iohub\server.py”, line 524, in init\n raise ioHubError(“Error during device creation …”)\n’]

When reading the documentation of Iohub more closely they specifically say that Iohub will only work with the 32-bit version of the iViewX SDK of SMI. I checked to see whether I have the iViewX SDK 32 bit version installed and I think I have (not sure). The example scripts of SMI work. But I still get the same Iohub error.

Can anyone help?

Thanks,
Hanne


#5

I think I might have found the problem. The default eyetracker YAML file in iohub contained some formatting issues. There were some extra spaces on line 40, column 27. If you remove the extra spaces the error doesn’t appear anymore.


#6

That’s great! Actually I thought that there is something wrong with the yaml-file (see first post), but I didn’t look close enough. Thanks a lot!


#7

Hi,

To not get any yaml scanner errors anymore, there is also an additional yaml file that needs to formatted properly.
In the folder: C:\Python27\Lib\site-packages\psychopy\iohub\devices\eyetracker\hw\smi\iviewx there is a file called “supported_config_settings.yaml”. I had to get rid of the enters on the end of the file and the spaces after a lot of lines and then I don’t get a yaml scanner error anymore and the calibration window opens.

I hope this helps you too!