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

logfile creation in libtobii is not unicode safe #120

Open smathot opened 5 years ago

smathot commented 5 years ago

When you specify a unicode path for the logfile in libtobii, a UnicodeEncodeError can be triggered.

Ideally, libtobii would use unicode (unicode in Python 2, str in Python 3) to work with the logfile, both in terms of the path name and the contents. And for byte strings (str in Python 2. bytes in Python 3), the assumed encoding (probably utf-8) should be documented.

This was reported here:

esdalmaijer commented 5 years ago

Pinging @grebdems and @pedrotari7

grebdems commented 5 years ago

On vacation atm, but we'll have a look at it in a couple of weeks! Thanks for bringing it to our attention!

grebdems commented 5 years ago

Btw, had a look at the thread at https://forum.cogsci.nl and the person that found the issue seems to be using a EyeX model. Unfortunately that model isn't supported by the research API. :-( It's a license issue (using the EyeX for analytical purposes actually violates the EULA for that device)...

Hate to be the bearer of bad news, but. @smathot Could you break it to the user in the forum? I wouldn't wan't him/her to waste a lot of effort for something that won't work in the end... :-/

smathot commented 5 years ago

@smathot Could you break it to the user in the forum? I wouldn't wan't him/her to waste a lot of effort for something that won't work in the end... :-/

Well no, I'm not going to tell someone that they cannot use a device for something that it's actually capable of doing. It's up to Tobii to enforce their own EULA.

grebdems commented 5 years ago

I see your point and I agree that it's kinda stupid. But it's not my decision and I can't really do anything about that in particular. It's a really hairy issue. I'm not out policing about our licenses. It's just that in the new software stack (of which the research API / Tobii Pro SDK is part of) it's simply not possible to get the proper unfiltered gaze data from the EyeX. So, not about not being allowed to do it, but not being able to do it... Just wanted to minimize (if possible) the disappointment of the user. Fail fast rather than late.

smathot commented 5 years ago

@grebdems Thanks for clearing that up. Sorry if my comment came across as a little aggressive, but I just don't want to get anywhere near this EULA issue.

But do I understand correctly that, licensing aside, PyGaze simply doesn't work at all with the Tobii EyeX? Is this something that has changed with recent updates to the Tobii SDK?

grebdems commented 5 years ago

No problem. I'd want to avoid it too, if I could. Didn't mean to drag you into it, just thought it was a bit weird (and possibly cumbersome) for me to get an account on that forum just to go in and post that.

And, yes, you got it right. The new SDK (Tobii Pro SDK, or tobii_research) only supports the "advanced" gaze data stream, and not the "consumer" gaze stream (our internal terminology) that the EyeX provides. I think the idea was to make it less confusing for the (legal... ;-) ) user - and also to help enforce the EULA, I guess.

To be honest I haven't tested if it works with the old setup (old "analysis SDK" + pygaze) but maybe you have some experience there? Anyway, that's still there, you just need to change TRACKERTYPE to 'tobiilegacy' (or did we choose another name, don't remember). And manage to install the old SDK, which is a bit of a challenge...