Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ioHub cannot find tracker #6196

Open
Nicobruno92 opened this issue Jan 26, 2024 · 1 comment
Open

[Bug]: ioHub cannot find tracker #6196

Nicobruno92 opened this issue Jan 26, 2024 · 1 comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior. 🔧 hardware/iohub Issue with hardware interfacing or calibration.

Comments

@Nicobruno92
Copy link

PsychoPy Version

2023.2.3

What OS are your PsychoPy running on?

Windows 11

Bug Description

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.

My basic code:

`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()
`

This is the error:

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

Expected Behaviour

connected to the eye-tracker and run calibration.

Steps to Reproduce

Run the code with the current version of psychopy and the last version of https://github.com/psychopy/psychopy-eyetracker-gazepoint

Additional context

No response

@Nicobruno92 Nicobruno92 added the 🐞 bug Issue describes a bug (crash or error) or undefined behavior. label Jan 26, 2024
@TEParsons TEParsons added the 🔧 hardware/iohub Issue with hardware interfacing or calibration. label Feb 8, 2024
@TEParsons TEParsons changed the title [Bug]: [Bug]: ioHub cannot find tracker Feb 8, 2024
@mdcutone
Copy link
Member

We're fixing this issue for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Issue describes a bug (crash or error) or undefined behavior. 🔧 hardware/iohub Issue with hardware interfacing or calibration.
Projects
None yet
Development

No branches or pull requests

3 participants