Cannot to get any eye tracker components to work - experiments crash

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win 10
PsychoPy version (e.g. 1.84.x): 2023.2.2
Standard Standalone? (y/n) If not then what?:y
What are you trying to achieve?:
My lab has been trying to get an eye-tracking experiment to run. The experiment crashes on any eye-tracker components. I am fairly certain this is not an issue with the experiment itself but rather a problem at the level of PsychoPy interacting with the eye tracker (Tobii Pro Nano). The messages we get when trying to run the experiemetn are below. Some of them are about the cedrusBox component package, which doesn’t make much sense because the experiment does not involve a cedrus component. However, from some of the other messages, it seems like experiment can’t communicate with eye tracker because critical components (packages?) are missing.

503.9187 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
503.9313 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
503.9373 INFO Loaded monitor calibration from [‘2020_11_05 15:33’]
503.9462 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
503.9556 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
C:\Program Files\PsychoPy\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
warnings.warn(“loaded more than 1 DLL from .libs:”
C:\Program Files\PsychoPy\lib\site-packages\scipy_init_.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
WARNING: pytables package not found. ioHub functionality will be disabled.
Hello from the pygame community. Contribute - pygame wiki
C:\Program Files\PsychoPy\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
warnings.warn(“loaded more than 1 DLL from .libs:”
WARNING: pytables package not found. ioHub functionality will be disabled.
C:\Program Files\PsychoPy\lib\site-packages\scipy_init_.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
addDeviceView: Error adding class.
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Error during device creation …
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 715, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 865, in addDeviceToMonitor
DeviceClass, dev_cls_name, evt_classes = import_device(dev_mod_pth,
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\devices_init
.py", line 933, in import_device
device_class = getattr(module, device_class_name)
AttributeError: module ‘psychopy.iohub.devices.eyetracker.hw.tobii’ has no attribute ‘EyeTracker’
Error during device creation …
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 715, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 865, in addDeviceToMonitor
DeviceClass, dev_cls_name, evt_classes = import_device(dev_mod_pth,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\devices_init_.py”, line 933, in import_device
device_class = getattr(module, device_class_name)
AttributeError: module ‘psychopy.iohub.devices.eyetracker.hw.tobii’ has no attribute ‘EyeTracker’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 649, in _addDevices
self.createNewMonitoredDevice(dev_cls_name, dev_conf)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\server.py”, line 728, in createNewMonitoredDevice
raise ioHubError(‘Error during device creation …’)
psychopy.iohub.errors.ioHubError: ioHubError:
Args: (‘Error during device creation …’,)

10.0665 EXP Created window1 = Window(allowGUI=True, allowStencil=False, autoLog=True, backendConf=UNKNOWN, backgroundFit=<method-wrapper ‘getattribute’ of attributeSetter object at 0x0000025BEA40D400>, backgroundImage=<method-wrapper ‘getattribute’ of attributeSetter object at 0x0000025BEA40D3A0>, bitsMode=UNKNOWN, blendMode=‘avg’, bpc=(8, 8, 8), color=array([0, 0, 0]), colorSpace=‘rgb’, depthBits=8, fullscr=<method-wrapper ‘getattribute’ of attributeSetter object at 0x0000025BEA40D1C0>, gamma=None, gammaErrorPolicy=‘raise’, lms=UNKNOWN, monitor=<psychopy.monitors.calibTools.Monitor object at 0x0000025BEF76F1F0>, multiSample=False, name=‘window1’, numSamples=2, pos=(0, 0), screen=0, size=array([1680, 1050]), stencilBits=0, stereo=False, title=‘PsychoPy’, units=‘height’, useFBO=True, useRetina=False, viewOri=0.0, viewPos=None, viewScale=None, waitBlanking=True, winType=‘pyglet’)
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\client_init_.py”, line 1081, in addDeviceView
dev_import_result = import_device(dev_mod_pth, dev_cls_name)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\devices_init
.py", line 933, in import_device
device_class = getattr(module, device_class_name)
AttributeError: module ‘psychopy.iohub.devices.eyetracker.hw.tobii’ has no attribute ‘EyeTracker’
Traceback (most recent call last):
10.0666 EXP window1: mouseVisible = True
10.0666 EXP window1: backgroundImage = ‘’
10.0666 EXP window1: backgroundFit = ‘none’
10.0679 EXP window1: Attempting to measure frame rate of screen (0) …
10.0679 EXP window1: recordFrameIntervals = False
10.2331 EXP window1: recordFrameIntervals = True
10.4167 EXP Screen (0) actual frame rate measured at 59.93Hz
10.4167 EXP window1: recordFrameIntervals = False
10.4168 EXP window1: mouseVisible = False
13.2926 DEPRECATION The Tobii eyetracker requires package ‘psychopy-eyetracker-tobii’ to be installed. Please install this package and restart the session to enable support.
13.2949 EXP Pavlovian: status = STARTED
13.2953 EXP window1: mouseVisible = True
13.4721 EXP Created Instruct = TextStim(class=<class ‘psychopy.visual.text.TextStim’>, alignHoriz=method-wrapper(…), alignText=‘center’, alignVert=method-wrapper(…), anchorHoriz=‘center’, anchorVert=‘center’, antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=0.0, draggable=False, flipHoriz=False, flipVert=False, font=‘Open Sans’, fontFiles=, height=0.05, italic=False, languageStyle=‘LTR’, name=‘Instruct’, opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text=str(…), units=‘height’, win=Window(…), wrapWidth=1)
13.4722 EXP window1: mouseVisible = True
17.3345 EXP Created image = ImageStim(class=<class ‘psychopy.visual.image.ImageStim’>, anchor=(‘center’, ‘center’), autoLog=True, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=0.0, draggable=False, flipHoriz=False, flipVert=False, image=‘singlefix.JPG’, interpolate=True, mask=None, maskParams=None, name=‘image’, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([2., 1.]), texRes=128.0, units=‘height’, win=Window(…))
17.3346 EXP window1: mouseVisible = True
17.3484 EXP Created CS = ImageStim(class=<class ‘psychopy.visual.image.ImageStim’>, anchor=(‘center’, ‘center’), autoLog=True, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=-1.0, draggable=False, flipHoriz=False, flipVert=False, image=‘default.png’, interpolate=True, mask=None, maskParams=None, name=‘CS’, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([2., 1.]), texRes=128.0, units=‘height’, win=Window(…))
19.5497 EXP Sound sound_1 set volume 1.000
19.5498 EXP window1: mouseVisible = True
19.5622 EXP Created CS_feedback = ImageStim(class=<class ‘psychopy.visual.image.ImageStim’>, anchor=(‘center’, ‘center’), autoLog=True, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=0.0, draggable=False, flipHoriz=False, flipVert=False, image=‘default.png’, interpolate=True, mask=None, maskParams=None, name=‘CS_feedback’, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([1.8, 1. ]), texRes=128.0, units=‘height’, win=Window(…))
19.5623 EXP window1: mouseVisible = True
19.5671 EXP Created earnings = TextStim(class=<class ‘psychopy.visual.text.TextStim’>, alignHoriz=method-wrapper(…), alignText=‘center’, alignVert=method-wrapper(…), anchorHoriz=‘center’, anchorVert=‘center’, antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=0.0, draggable=False, flipHoriz=False, flipVert=False, font=‘Open Sans’, fontFiles=, height=0.05, italic=False, languageStyle=‘LTR’, name=‘earnings’, opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text=‘Total dollars earned:’, units=‘height’, win=Window(…), wrapWidth=1)
19.5672 EXP window1: mouseVisible = True
19.5682 EXP Created total = TextStim(class=<class ‘psychopy.visual.text.TextStim’>, alignHoriz=method-wrapper(…), alignText=‘center’, alignVert=method-wrapper(…), anchorHoriz=‘center’, anchorVert=‘center’, antialias=True, autoDraw=False, autoLog=True, bold=False, color=array([1., 1., 1.]), colorSpace=‘rgb’, contrast=1.0, depth=-1.0, draggable=False, flipHoriz=False, flipVert=False, font=‘Open Sans’, fontFiles=, height=0.05, italic=False, languageStyle=‘LTR’, name=‘total’, opacity=1.0, ori=0.0, pos=array([0., 0.]), rgb=UNKNOWN, text=‘’, units=‘height’, win=Window(…), wrapWidth=1)
0.0220 EXP Instruct: autoDraw = True
2.5911 EXP window1: mouseVisible = True
2.5942 EXP Created calibrationTarget = ShapeStim(class=<class ‘psychopy.visual.shape.ShapeStim’>, anchor=(‘center’, ‘center’), autoDraw=False, autoLog=True, closeShape=True, color=method-wrapper(…), colorSpace=‘rgb’, contrast=None, depth=0, draggable=False, fillColor=array([0, 0, 0]), fillColorSpace=‘rgb’, fillRGB=array([0, 0, 0]), interpolate=True, lineColor=array([-1., -1., -1.]), lineColorSpace=‘rgb’, lineRGB=array([-1, -1, -1]), lineWidth=2.0, name=‘calibrationTarget’, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([0.02, 0.02]), units=‘height’, vertices=ndarray(…), win=Window(…), windingRule=None)
2.5944 EXP window1: mouseVisible = True
2.5973 EXP Created calibrationTargetInner = ShapeStim(class=<class ‘psychopy.visual.shape.ShapeStim’>, anchor=(‘center’, ‘center’), autoDraw=False, autoLog=True, closeShape=True, color=method-wrapper(…), colorSpace=‘rgb’, contrast=None, depth=0, draggable=False, fillColor=array([-1. , 0.00392157, -1. ]), fillColorSpace=‘rgb’, fillRGB=array([-1. , 0.00392157, -1. ]), interpolate=True, lineColor=array([-1., -1., -1.]), lineColorSpace=‘rgb’, lineRGB=array([-1, -1, -1]), lineWidth=2.0, name=‘calibrationTargetInner’, opacity=1.0, ori=0.0, pos=array([0., 0.]), size=array([0.007, 0.007]), units=‘height’, vertices=ndarray(…), win=Window(…), windingRule=None)
2.6664 EXP window1: mouseVisible = True
1.5804 DEPRECATION The Tobii eyetracker requires package ‘psychopy-eyetracker-tobii’ to be installed. Please install this package and restart the session to enable support.
1.6985 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
File “C:\Users\lsbcherkasovalab\Documents\Maria’s Thesis\Pavlovian_lastrun.py”, line 1198, in
run(
File “C:\Users\lsbcherkasovalab\Documents\Maria’s Thesis\Pavlovian_lastrun.py”, line 563, in run
calibration.run()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\hardware\eyetracker.py”, line 178, in run
tracker = self.eyetracker.getIOHubDeviceClass(full=True)
AttributeError: ‘NoneType’ object has no attribute ‘getIOHubDeviceClass’
################# Experiment ended with exit code 1 [pid:4200] #################
528.4766 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
528.4860 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
528.4917 INFO Loaded monitor calibration from [‘2020_11_05 15:33’]

What did you try to make it work?:
In response to one component of the message: “DEPRECATION The Tobii eyetracker requires package ‘psychopy-eyetracker-tobii’ to be installed. Please install this package and restart the session to enable support,” we tried to pip install ‘psychopy-eyetracker-tobii’ package. This did not work. ERROR: Could not find a version that satisfies the requirement psychopy-eyetracker-tobii (from versions: none); ERROR: No matching distribution found for psychopy-eyetracker-tobii. The package definitely exists, so perhaps some compatibility issue?

Also, I looked at the PsychoPy-Tobii-Workshop shared by Rebecca Hirst (shared - Google Drive, an incredibly helpful resource) and downloaded the antisaccade experiment provided. That experiment failed to run with similar messages around the cedrusBox component:
Alert 4120: Component etRecord_2 has stop time set as a duration, but doesn’t have a start time
For more info see https://docs.psychopy.org/alerts/4120.html## Running: C:\Users\lsbcherkasovalab\Documents\antisaccade\antisaccade_lastrun.py ##
47.3463 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
47.3568 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
47.3671 EXP Imported conditions.xlsx as conditions, 8 conditions, 5 params
47.3707 INFO Loaded monitor calibration from [‘2020_11_05 15:33’]
47.3904 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
47.3997 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
47.4103 EXP Imported conditions.xlsx as conditions, 8 conditions, 5 params
C:\Program Files\PsychoPy\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
warnings.warn(“loaded more than 1 DLL from .libs:”
C:\Program Files\PsychoPy\lib\site-packages\scipy_init_.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
WARNING: pytables package not found. ioHub functionality will be disabled.
Hello from the pygame community. Contribute - pygame wiki
C:\Program Files\PsychoPy\lib\site-packages\numpy_distributor_init.py:30: UserWarning: loaded more than 1 DLL from .libs:
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
C:\Program Files\PsychoPy\lib\site-packages\numpy.libs\libopenblas64__v0.3.21-gcc_10_3_0.dll
warnings.warn(“loaded more than 1 DLL from .libs:”
WARNING: pytables package not found. ioHub functionality will be disabled.
C:\Program Files\PsychoPy\lib\site-packages\scipy_init_.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.24.4
Traceback (most recent call last):
File “C:\Users\lsbcherkasovalab\Documents\antisaccade\antisaccade_lastrun.py”, line 1395, in
inputs = setupInputs(expInfo=expInfo, thisExp=thisExp, win=win)
File “C:\Users\lsbcherkasovalab\Documents\antisaccade\antisaccade_lastrun.py”, line 219, in setupInputs
ioServer = io.launchHubServer(window=win, experiment_code=‘antisaccade’, session_code=ioSession, datastore_name=thisExp.dataFileName, **ioConfig)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\contrib\lazy_import.py”, line 118, in call
return obj(*args, **kwargs)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\client\connect.py”, line 260, in launchHubServer
return ioHubConnection(iohub_config)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\client_init_.py”, line 294, in init
self.iohub_status = self.startServer(ioHubConfig, ioHubConfigAbsPath)
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\client_init
.py", line 1033, in _startServer
self.createDeviceList(ioHubConfig[‘monitor_devices’])
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\iohub\client_init
.py", line 1059, in _createDeviceList
if device_config.get(‘enable’, True) is True:
AttributeError: ‘str’ object has no attribute ‘get’
################ Experiment ended with exit code 1 [pid:12912] #################
63.6758 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
63.6855 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
63.6960 EXP Imported conditions.xlsx as conditions, 8 conditions, 5 params
63.6977 INFO Loaded monitor calibration from [‘2020_11_05 15:33’]
317.0058 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.0116 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.1117 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.1230 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.2418 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.2509 ERROR Failed to load component package cedrusBox. Does it have a __init__.py?
317.2563 INFO Loaded monitor calibration from [‘2020_11_05 15:33’]
Generating PsychoPy script…

Any help would be very much appreciated!!! We don’t know where to even begin approaching this issue.

Unfortunately, we’re still struggling to implement the new plugin model for eye trackers, so I would recommend PsychoPy version 2022.2.5 until we get that fixed.

Thank you for the advice! Could you please recommend the best way to go about downgrading to PsychoPy version 2022.2.5? We have other experiments running on our eye-tracker computer that were built using a 2021 version, and we don’t want any changes we make to affect those experiments. Any advice would be appreciated!!

Could you continue to use the 2021 version? If you don’t need any of the newer features and your experiments are running then it would be reasonable not to change.

Hi! The reason we upgraded is that the 2021 version doesn’t have the eye tracker components in the Builder. We tried implementing eye tracking in the coder and got as far as calibration but didn’t get data acquisition to work. This is why we wanted a later version (2022-2023) with the eye tracker components in the builder.

Ok. Well 2022.2.5 is a pretty stable version, apart from on some browser’s in experiments where you need to break out of a loop early using trials.finished = True. I would try setting up a simple eye tracking demo and if that works then I think it would be worth upgrading your experiments, even if one or two things in the older code need tweaking.

1 Like

Thank you for the suggestion, this worked!