Error when connecting to Tobii eyetracker

OS (e.g. Win10): Win 10
PsychoPy version (e.g. 1.84.x): 2022.1.1
Standard Standalone? (y/n) : Yes

Hi all,

I’m working on an eyetracking project with Psychopy and Tobii. I inserted the Eyetracker Record and Region of Interest components into my own project in the same way as eyetracking demo does. The demo works but my program reported the error message:

GET_DEV_INTERFACE_ERROR: _getRPCInterface returned: None
1.0482     WARNING     We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['pyo'] (in that order).
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
  File "C:\Users\utente\Desktop\ADAM\ADAM_eyetracker_lastrun.py", line 525, in <module>
    etRecord_2.status = STARTED
  File "C:\Users\utente\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\hardware\eyetracker.py", line 31, in status
    self.tracker.clearEvents()
  File "C:\Users\utente\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\iohub\client\__init__.py", line 153, in __getattr__
    raise AttributeError(self, name)
AttributeError: (<psychopy.iohub.client.ioHubDeviceView object at 0x0000022FCBA06D30>, 'clearEvents')
################# Experiment ended with exit code 1 [pid:9444] #################

Does anyone know what the problem could be?

Thank you!!

Hi!

Did you figure out what was the problem?

Hi!

I encountered a lot of errors when working on this eyetracking project. Not 100% sure about to which the posted error message relates. Hope this information help:

I was working on the program on a laptop with mouse simulation and testing the program with Tobii on another computer. I found that even after I changed the settings from mouse simulation to real eyetracker in builder, the actually python codes didn’t change. After modifying the code that using iohub to connect eyetracker manually, it worked. Can’t remember very clearly, but after changing the setting, saving, closing and restarting Psychopy, the builder view somehow also worked.

Hi! @yujia

I have the same error message when connecting Tobii to psychopy. (latest version 2023.2.3, but the older version was fine)

I wonder if the code you modified are the below ones or somewhere else? (below seems correct for me)

    # Setup eyetracking
    ioConfig['eyetracker.hw.tobii.EyeTracker'] = {
        'name': 'tracker',
        'model_name': 'Tobii TX300',
        'serial_number': '',
        'runtime_settings': {
            'sampling_rate': 60.0,
        }
    }

Hello!
I haven’t been working on eyetracking stuff for a while. But yes, I think so. I remembered the code maintained as ‘eyetracker.hw.mouse.EyeTracker’ even after I changed it into Tobii. After fixing it, the program worked.

1 Like

Hi! @yujia

Thank you for your reply!
I’ll try it. :clap:

Best wishes,
Binjie Yang

Hi! @yujia and @Jar_Young . I hope you are both doing well.

I seem to be in a similar situation while trying to launch my experiment. I used PsychoPY2023.2.3 on my laptop with mousegaze at first to build the experiment, then manually moved it to a computer that is not connected to Internet where the experiment will take place.

I have tried updating locally both PsychoPY and the Tobii component, as they were outdated (psychopy was on version 2022.2.1 or something of the sort). After seeing it crash, I plugged the Wifi on strictly for downloading and updating PsychoPY with Tobii component through the ‘usual’ way and the results are the same. I found that depending on what I ask of my task, different codes appear but i have seen in most cases the same error message that you have on this post.

Is it at all possible to enlighten me as to how you solved this problem? Did you do something else that isn’t written here?

Thank you so much in advance,
J

Hi! @martin14

I replace my newest psychopy version to 2023.1.3, and all things went well.
Maybe you can have a try.

Best wishes,
Jarvis