Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Error in Drift correction

edited December 2016 in PyGaze

I am getting the following error when I try to run the experiment containing drift correction:

Unexpected error

item-stack: experiment[prepare].new_pygaze_drift_correct[prepare]
exception message: pygaze_eyetracker not found
time: Tue Dec 06 17:31:53 2016
exception type: AttributeError

  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\misc\", line 140, in run
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 413, in run
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 90, in execute
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 122, in prepare
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 124, in prepare
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 122, in prepare
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\share\opensesame_plugins\pygaze_drift_correct\", line 76, in prepare
  File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\", line 238, in __getattr__
    raise AttributeError(u'%s not found' % var)
AttributeError: pygaze_eyetracker not found

I think the attribute should be 'pygaze._eyetracker' instead of pygaze_eyetracker'. Not sure though but if so kindly suggest how to correct it.


  • Hi Arpit,

    It could be that your eyetracker is set to 'dummy mode' in the pygaze_init item. The drift correction only works if you've selected the correct eye tracker in this item. Of course this means you also have to have this item somewhere in your experiment in the first place.

    Let me know if this is not the cause of the error.



  • Hi Josh,
    Thank you for the response. I was running it in Eye tribe mode as before the drift correction, use to play custom calibration script and that was working. I was using it just after the custom calibration.
    Anyways, I am no longer using it as I written a custom script for the same operation.
    Thanks anyways.

  • Hi guys,

    I think the problem is simple, but admittedly a little counterintuitive: The run phase of pygaze_init must be executed before the prepare phase of pygaze_drift_correction. If you put them both in the same sequence, this is not the case, and you get this error. Could that be it?


  • Hi Sebastian,
    Actually that could be a possible explanation. Now what I am doing is, in my actual experiment I have again put the script for custom drift check after custom calibration but calls it only when needed. So here it actually runs only after running the initializing the eye tracker, thereby not getting the error.

Sign In or Register to comment.