# Error when connecting to Tobii eyetracker

**URL:** <https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603>\
**Category:** Builder\
**Tags:** eyetracking\
**Created:** [April 13, 2022, 7:47am UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603 "2022-04-13T07:47:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yujia](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yujia](https://discourse.psychopy.org/u/yujia)\
**Post date:** [April 13, 2022, 7:47am UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/1 "2022-04-13T07:47:37Z")

</div>

**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](https://github.com/psychopy/psychopy/tree/release/psychopy/demos/builder/Feature%20Demos/eyetracking) does. The demo works but my program reported the error message:

```auto
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!!

---

<div class="post-metadata">

**Author:** ![nastialado](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/nastialado/32/34029_2.png) [@nastialado](https://discourse.psychopy.org/u/nastialado)\
**Post date:** [March 22, 2023, 6:30pm UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/2 "2023-03-22T18:30:41Z")

</div>

Hi!

Did you figure out what was the problem?

---

<div class="post-metadata">

**Author:** ![yujia](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yujia](https://discourse.psychopy.org/u/yujia)\
**Post date:** [March 22, 2023, 9:08pm UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/3 "2023-03-22T21:08:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jar\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jar_young/32/40094_2.png) [@Jar\_Young](https://discourse.psychopy.org/u/Jar_Young)\
**Post date:** [November 14, 2023, 12:39am UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/4 "2023-11-14T00:39:01Z")

</div>

Hi! @yujia

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

> [@yujia](#):
>
> After modifying the code that using iohub to connect eyetracker manually, it worked.

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

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

```

---

<div class="post-metadata">

**Author:** ![yujia](https://avatars.discourse-cdn.com/v4/letter/y/bb73d2/32.png) [@yujia](https://discourse.psychopy.org/u/yujia)\
**Post date:** [November 20, 2023, 8:30pm UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/5 "2023-11-20T20:30:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jar\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jar_young/32/40094_2.png) [@Jar\_Young](https://discourse.psychopy.org/u/Jar_Young)\
**Post date:** [November 21, 2023, 7:34am UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/6 "2023-11-21T07:34:11Z")

</div>

Hi! @yujia

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

Best wishes,  
Binjie Yang

---

<div class="post-metadata">

**Author:** ![martin14](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@martin14](https://discourse.psychopy.org/u/martin14)\
**Post date:** [February 23, 2024, 8:53pm UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/7 "2024-02-23T20:53:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jar\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jar_young/32/40094_2.png) [@Jar\_Young](https://discourse.psychopy.org/u/Jar_Young)\
**Post date:** [March 11, 2024, 4:51am UTC](https://discourse.psychopy.org/t/error-when-connecting-to-tobii-eyetracker/28603/8 "2024-03-11T04:51:54Z")

</div>

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
