# Problem with Eyelink average gaze (x and y) is always 0. iohub warning: Display / Monitor unit type has not been set

**URL:** <https://discourse.psychopy.org/t/problem-with-eyelink-average-gaze-x-and-y-is-always-0-iohub-warning-display-monitor-unit-type-has-not-been-set/29551>\
**Category:** Coding\
**Created:** [June 10, 2022, 2:45pm UTC](https://discourse.psychopy.org/t/problem-with-eyelink-average-gaze-x-and-y-is-always-0-iohub-warning-display-monitor-unit-type-has-not-been-set/29551 "2022-06-10T14:45:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steph](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@Steph](https://discourse.psychopy.org/u/Steph)\
**Post date:** [June 10, 2022, 2:45pm UTC](https://discourse.psychopy.org/t/problem-with-eyelink-average-gaze-x-and-y-is-always-0-iohub-warning-display-monitor-unit-type-has-not-been-set/29551/1 "2022-06-10T14:45:43Z")

</div>

OS: Windows 10 pro  
Psychopy version: 2022.1.4  
Eyetracker: Eyelink

The eyetracker works, calibrates, time between fixations is shown, however the average gazes in x and y always return 0. Please help, code and output are shown below. (in file:preferences:general unit is set to “norm”)

code:  
from psychopy import visual, core, gui, data, event  
from psychopy.core import getTime  
from psychopy.iohub import launchHubServer  
from psychopy.iohub.constants import EventConstants  
from time import sleep, time  
import os  
import os.path as op  
import pickle  
import matplotlib.pyplot as plt  
import numpy as np  
from random import shuffle

meds =   
t1 = 10  
t\_ini=time()

iohub\_config = {‘eyetracker.hw.gazepoint.gp3.EyeTracker’:  
{‘name’: ‘tracker’, ‘device\_timer’: {‘interval’: 0.005}}}

io = launchHubServer(\*\*iohub\_config)

t\_stim =

tracker = io.devices.tracker  
calib = tracker.runSetupProcedure()

timer = core.Clock()  
tracker.setRecordingState(True)  
t\_stim.append(tracker.trackerTime())  
stime = timer.getTime()  
while timer.getTime()-stime \< t1:  
for evento in tracker.getEvents(EventConstants.FIXATION\_END):  
meds.append(evento)

tracker.setRecordingState(False)

gaze\_d\_x =   
gaze\_d\_y =   
tiempos =   
for med in meds:  
gaze\_d\_x.append(med.average\_gaze\_x)  
gaze\_d\_y.append(med.average\_gaze\_y)  
tiempos.append(med.device\_time)  
print(gaze\_d\_x,gaze\_d\_y,tiempos)

output:  
\*\*\* iohub warning: Display / Monitor unit type has not been set.  
[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] [279.2666, 279.2666, 279.52495999999996, 279.52495999999996, 279.89709999999997, 279.89709999999997, 280.17224, 280.17224, 280.59256, 280.59256, 281.12644, 281.12644, 281.35278999999997, 281.35278999999997, 282.04846, 282.04846, 282.48507, 282.48507, 283.05106, 283.05106, 283.26151, 283.26151, 283.61734, 283.61734, 284.03784, 284.03784, 284.47449, 284.47449, 284.74966, 284.74966, 285.05685, 285.05685, 285.41262, 285.41262, 285.73621, 285.73621, 285.97876, 285.97876, 286.31845999999996, 286.31845999999996, 286.65817, 286.65817, 287.19199, 287.19199, 287.48297, 287.48297, 288.30798000000004, 288.30798000000004, 288.56665, 288.56665, 288.84158, 288.84158]  
ioHub Server Process Completed With Code: 0  
################# Experiment ended with exit code 0 [pid:2328] #################
