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
479 stars 68 forks source link

Fix Path name #17

Closed kinow closed 3 years ago

kinow commented 3 years ago

Hi!

I had a look at the changes from yesterday, and looking at this commit 3bb6d3b50efb3ec7618940daab210dec3184adeb changed a bit the cv importer.

The old check_path_type function, in eyeloop/utilities/general_operations.py started by checking if the file name was "0". If so, it would go into a branch of the if/else logic that starts the GUI.

I changed a little the current code to match the old code, and got it working as yesterday.

@simonarvin I can confirm too, that after this I can press 1, 2, 3, etc on the GUI, and it doesn't crash! :tada: so I will close #10

Not sure if the best fix, or if there's something that needs changing in the other importer, or in the base class?

Thanks! Bruno

cfculhane commented 3 years ago

Ahh oops I forgot to mention that - I removed that function as it was better served by the pathlib.Path object, didn't think about that consequence - I think going forward it might be better to use a YAML config file or similar and use booleans, but for now this is a good fix. Apologies!

kinow commented 3 years ago

Ahh oops I forgot to mention that - I removed that function as it was better served by the pathlib.Path object, didn't think about that consequence - I think going forward it might be better to use a YAML config file or similar and use booleans, but for now this is a good fix. Apologies!

No worries @cfculhane . I really liked the new code organisation. And it's normal to have a few hiccups after a refactoring. Sorry for not being able to help more, I'm still reading the preprint paper, some wikipedia pages, and trying to learn what's an open/closed-loop study, and understanding more how the code works.