This does not work. I have been trying to make it work with the current distribution of psychopy (2023.2) and nothing makes sense been trying to fix it without success, and not being able to narrow it down.
`from psychopy import core, visual
from psychopy.iohub import launchHubServer
# Configure the eyetracker devicepip
iohub_config = {
"eyetracker.hw.gazepoint.gp3.EyeTracker": {
"name": "tracker",
"enable": True,
"save_events": True,
"stream_events": True,
"event_buffer_length": 1024,
"monitor_event_types": ['BinocularEyeSampleEvent', 'FixationStartEvent', 'FixationEndEvent'],
"calibration": {
"target_duration": 1.25,
"target_delay": 0.5
},
"model_name": "GP3",
"manufacturer_name": "GazePoint"
}
}
# Start the ioHub server with the configuration
io = launchHubServer(**iohub_config)
tracker = io.devices.tracker
# Setup a window for calibration
win = visual.Window(fullscr=True)
# Start the calibration process
tracker.runSetupProcedure(win)
# Main experiment code goes here
# Cleanup
win.close()
io.quit()
`
*** iohub warning: Display / Monitor unit type has not been set.
Error during device creation ....
Traceback (most recent call last):
File "C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\server.py", line 715, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File "C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\server.py", line 849, in addDeviceToMonitor
_dconf = yload(open(dev_conf_pth, 'r'), Loader=yLoader)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\devices\eyetracker\hw\gazepoint\gp3\default_eyetracker.yaml'
Error during device creation ....
Traceback (most recent call last):
File "C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\server.py", line 715, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File "C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\server.py", line 849, in addDeviceToMonitor
_dconf = yload(open(dev_conf_pth, 'r'), Loader=yLoader)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\devices\eyetracker\hw\gazepoint\gp3\default_eyetracker.yaml
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\cocud\anaconda3\envs\experimental\lib\site-packages\psychopy\iohub\server.py", line 649, in _addDevices
self.createNewMonitoredDevice(dev_cls_name, dev_conf)
File "C:\Users\cocud\anaconda3\envs\experimental\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 ....',)
addDeviceView: Error adding class.
Traceback (most recent call last):
File "C:\Users\cocud\anaconda3\envs\experimental\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:\Users\cocud\anaconda3\envs\experimental\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.gazepoint.gp3' has no attribute 'EyeTracker'
Traceback (most recent call last):
File "c:\Users\cocud\Documents\wandering-mind\SART\asdd.py", line 24, in
tracker = io.devices.tracker
AttributeError: 'ioHubDevices' object has no attribute 'tracker'