simonarvin / eyeloop

EyeLoop is a Python 3-based eye-tracker tailored specifically to dynamic, closed-loop experiments on consumer-grade hardware.
GNU General Public License v3.0
485 stars 67 forks source link

Fix loop errors #7

Closed kinow closed 4 years ago

kinow commented 4 years ago

Hi!

When I start the GUI, the console is full of warnings such as 'int' object is not subscriptable. The first commit in this PR shows where that is coming from. The self.center value is -1, and the first time the code proceeds, it tries to access self.center[...] resulting in that error.

The second error, that happens with less frequency, is 'Shape' object has no attribute 'standard_corners'. It appears that standard_corners, area, and other attributes are initialized in the reset - or in other functions - but are used before the reset initializes the attributes.

Resulting in no attribute error. The fix in this PR removes the error from the log, but that's most likely not the right solution. Feel free to close this PR if there's another solution in progress (cc @cfculhane you said you are refactoring some of the code?).