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
670 stars 211 forks source link

Exception: The setting "TRACKERSERIALNUMBER" does not exist #146

Closed wangxinzhi0 closed 2 years ago

wangxinzhi0 commented 4 years ago

hello,

when I run this program with tobii Eye Tracker 4C, it will have something wrong. The traceback is as follow. The main problem is "The setting "TRACKERSERIALNUMBER" does not exist".

I would appreciate it if you could give me a solution. Thanks for your time.

Traceback (most recent call last):

File "", line 1, in runfile('D:/anaconda_python_exercise/dataset/PyGaze/examples/slideshow/experiment.py', wdir='D:/anaconda_python_exercise/dataset/PyGaze/examples/slideshow')

File "D:\Anaconda3\envs\py3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)

File "D:\Anaconda3\envs\py3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/anaconda_python_exercise/dataset/PyGaze/examples/slideshow/experiment.py", line 30, in tracker = EyeTracker(disp)

File "D:\Anaconda3\envs\py3\lib\site-packages\pygaze\eyetracker.py", line 95, in init self.class.init(self, display, **args)

File "D:\Anaconda3\envs\py3\lib\site-packages\pygaze_eyetracker\libtobii.py", line 49, in init if hasattr(settings, 'TRACKERSERIALNUMBER'):

File "D:\Anaconda3\envs\py3\lib\site-packages\pygaze\settings.py", line 51, in getattr raise Exception(u'The setting "%s" does not exist' % setting)

Exception: The setting "TRACKERSERIALNUMBER" does not exist

esdalmaijer commented 2 years ago

Add the variable TRACKERSERIALNUMBER to your constants.py file, adding in your tracker's serial number.