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

Dummy tracker drawing error - "global name 'FGC' is not defined" #91

Closed kasmith closed 6 years ago

kasmith commented 7 years ago

I was trying PyGaze out on my laptop and couldn't get the simple demo to work because of the following error:

Traceback (most recent call last): File "simple_tracker_experiment.py", line 69, in checked = tracker.drift_correction() File "/usr/local/lib/python2.7/site-packages/pygaze/_eyetracker/libdummytracker.py", line 103, in drift_correction self.draw_drift_correction_target(pos[0], pos[1]) File "/usr/local/lib/python2.7/site-packages/pygaze/_eyetracker/libdummytracker.py", line 401, in draw_drift_correction_target self.screen.draw_fixation(fixtype='dot', colour=FGC, pos=(x,y), pw=0, \ NameError: global name 'FGC' is not defined

If I build the code from scratch but change the variable "FGC" to "settings.FGC", it works perfectly fine, so I think this is a simple fix.

Thanks!

esdalmaijer commented 6 years ago

Thanks for pointing this out! It's fixed with https://github.com/esdalmaijer/PyGaze/commit/c03473c6d093cc75d9b33b32ac30d9e3105f566d