esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
671 stars 211 forks source link

EyeTribe get_frame() error #68

Closed hannehuygelier closed 7 years ago

hannehuygelier commented 8 years ago

While using the EyeTribe eyetracker, an error occurs (see error message below). This error seems to occur while a pause screen is presented to the user (before presenting this screen I stop recording with the eyetracker). If I print out the content of response, the dictionary does not contain u'frame' after the values, but it contains u'calibresults'. Is it wrong to stop the recording during pauze screens in the experiment? (This error also occurred while trying to run the simple_tracker_experiment example after one of the first trials).

Exception in thread samplestreamer: Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 810, in bootstrap_inner self.run() File "C:\Python27\lib\threading.py", line 763, in run self.__target(_self.args, *_self.__kwargs) File "C:\Python27\lib\site-packages\pygaze_eyetracker\pytribe.py", line 238, in _stream_samples sample = self._tracker.get_frame() File "C:\Python27\lib\site-packages\pygaze_eyetracker\pytribe.py", line 851, in get_frame return { 'timestamp': response['values']['frame']['timestamp'], KeyError: 'frame'

esdalmaijer commented 8 years ago

This is an interesting one; I'm not sure how a 'calibresults' results ended up there. Would you mind elaborating on what you're trying to do exactly, preferably in a short code snippet? (I.e. where does it go wrong? Are you, for example, trying to get a sample while the tracker is not recording?)

Also, minor point, would you mind sharing what version of PyGaze you are using? Is it the latest commit? (A commit number would be great :) )

esdalmaijer commented 8 years ago

Should be solved with this commit.