# Eyex calibration on Psychopy

**URL:** <https://discourse.psychopy.org/t/eyex-calibration-on-psychopy/11423>\
**Category:** Builder\
**Tags:** eyetracking\
**Created:** [March 10, 2020, 6:59pm UTC](https://discourse.psychopy.org/t/eyex-calibration-on-psychopy/11423 "2020-03-10T18:59:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Damasceno](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/gustavo_damasceno/32/5764_2.png) [@Gustavo\_Damasceno](https://discourse.psychopy.org/u/Gustavo_Damasceno)\
**Post date:** [March 10, 2020, 6:59pm UTC](https://discourse.psychopy.org/t/eyex-calibration-on-psychopy/11423/1 "2020-03-10T18:59:33Z")

</div>

OS: Win 10  
PsychoPy version: v2020.1.3

**What am I trying to achieve:**

I am trying to integrate Tobii Eyex eye-tracker and Psychopy, but the calibration process does not work as expected.

I initialized the experiment with this block of code in “Begin experiment”, like the documentation indicates:

_from psychopy.iohub import launchHubServer_  
_from psychopy.core import getTime, wait_

_iohub\_config = {‘eyetracker.hw.tobii.EyeTracker’:_

- {‘name’: ‘tracker’, ‘runtime\_settings’: {‘sampling\_rate’: 120}}}\*

\*io = launchHubServer(\*_iohub\_config)_

_# Get the eye tracker device._  
_tracker = io.devices.tracker_

_# run eyetracker calibration_  
_r = tracker.runSetupProcedure()_

_# Check for and print current eye position every 100 msec._  
_stime = getTime()_  
_while getTime()-stime \< 5.0:_

- print(tracker.getPosition())\*
- wait(0.1)\*

_tracker.setRecordingState(False)_

_# Stop the ioHub Server_  
_io.quit()_

Unfortunately, does not works. The calibration screen appears but does not offer the calibration process when i press ‘space’ and the stdout was:

##### Experiment ended.

Generating PsychoPy script…

########### Running: C:\Users\Censipam 03\Music\untitled\_lastrun.py ############  
pygame 1.9.6  
Hello from the pygame community. [https://www.pygame.org/contribute.html](https://www.pygame.org/contribute.html)  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
None  
ioHub Server Process Completed With Code: 0  
0.8405 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 [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).  
3.6093 WARNING User requested fullscreen with size [1024 768], but screen is actually [1440, 900]. Using actual size

##### Experiment ended.

**What did i try to make it work?:**

I’ve tried to manage different python versions and different psychopy3 versions, but nothing seems to work
