Open PaulaSchi opened 4 years ago
Hi @PaulaSchi Me and my colleagues have been scratching our heads about this issue. The error message seems to indicate a scenario that I thought wasn't programmatically possible (perhaps just lack of knowledge from my side). Maybe there could be something broken with your installation? Multiple versions of the same file somehow getting mixed up? Really perplexing. Either way, I have some follow up questions that might help track it down:
All the best!
Hi @grebdems Thank you very much for the reply!
Here are my answers:
The "fix" we use is to re-run the experiment file. When that does not work, I turn the eyetracker off, and then turn it on again :-) It's an "easy" fix, but an undesirable while a subject is present...
One thing that seemed to drive the error appearance rate down, was to change the OpenSesame backend from xpyriment (based on Expyriment) to legacy (based on PyGame). This drove the appearance of this error down from about 50%.
Versions: Python: 2.7.13 PyGaze: 0.6.0a25 OpenSesame: 3.2.8 Tobii-research: 1.7.0
We only use one computer. It would be difficult to connect the system to another one...
Specs: Windows 7 Professional Intel Core i7-3770 CPU @ 3.40GHz RAM: 4 GB 64 bits
No, we haven't contacted them about that. More recently, the sampling rate is stable around 59 or 60 Hz.
We just have one eyetracker.
Not that I am aware of. Where would we do that in OpenSesame? We specify the serial number in the "TobiiPro eyetracker Manager" software.
Really appreciate any input that may help solve this error, or at least understand when it occurs.
Best, Paula
Hi @PaulaSchi Thanks for the swift reply! Let's see if we can get anywhere closer to understanding your problem.
Have nice weekend! (and Valentines Day) /Magnus
Hi, Thank you very much for the reply!
As you suggest, we will try setting up the eyetracker with a different computer, to see if that fixes the issue, and also try to update PyGaze. We don't use any additional hardware (except for a response box).
I made several changes in libtobii.py, and now get a different error message: "tuple index out of range". :)
The changes made are:
self.eyetrackers = tr.find_all_eyetrackers()
self.eyetracker = self.eyetrackers[0]
(Taken from: http://developer.tobiipro.com/python/python-step-by-step-guide.html)
The result is that the experiment either works perfectly, or it sends the error "tuple index out of range" in self.eyetracker = self.eyetrackers[0].
It is very odd, as the experiment may run perfectly to the end, and, just one minute later, when trying to restart the experiment, the error pops up even though the experiment file is the same. After trying to open the experiment a couple more times, the experiment works again.
(Just to be clear: In the last 40 experiments, the error "has no attribute t0" has not appeared at all.)
Is there any way I could just "tell" Python the serial number of the tracker, so it doesn't have to look for it? It looks like that might fix the issue.
Thanks again for your time and insight! Paula
The tuple index error seems to suggest that sometimes the Tobii tracker cannot be identified. I've actually seen that very issue with a colleague of mine, and it turned out their Tobii TX300 was malfunctioning. I'd recommend getting your hardware checked out by Tobii.
Thank you for the suggestion and the fast reply @esdalmaijer!
Hi again! Yes, I agree with @esdalmaijer that the tuple error does seem to indicate that the eyetracker isn't being discovered. Still struggle with understanding how that would have lead to the eyetracking object not being instantiated (and t0 attribute not being there), but I should probably just pass that on to some more Python-savvy colleagues.
One suggestion is to try and add a condition or short loop that repeats the find_all_eyetrackers() call a few times as long as it comes up empty. I know that we've seen cases where eyetrackers (and I think specifically Spectrum) sometimes doesn't get discovered on the first try, but just rerunning the search finds it.
Unfortunately there's no way to find the eyetracker without running a search, even if you supply the serial numbe. (in the C and C# binding there's a function call that appears to do this, but behind the scenes it still does the same search).
Hi,
We've introduced a loop to repeat the find_all_eyetrackers() function. In the past 30+ experiment runs, we have had no error messages. We can detect that the loop is indeed used in about 30% of cases, as the loop prints a message every time it is accessed (in the OpenSesame debug window). Sometimes the search loop is not accessed, and other times it takes anywhere between 40 seconds - 1 minute to find the eyetracker. However, it seems the loop solved our problem, which is great!
Thank you @grebdems and @esdalmaijer for your help!
Hi!
I am working on an experiment with OpenSesame and a Tobii eyetracker, and I sometimes get the following error message:
item-stack: experiment[run].pygaze_init[run] exception type: AttributeError exception message: TobiiProTracker instance has no attribute 't0'
Is there any way to "program" my way around it?
Also, I'd like to mention this is a follow-up message that one of our team members posted initially on the OpenSesame forum: https://forum.cogsci.nl/index.php?p=/discussion/5312/tobii-150-spectrum-and-pygaze#latest @esdalmaijer @grebdems @pedrotari7
Thanks!