-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TobiiProTracker instance has no attribute 't0' #142
Comments
Hi @PaulaSchi
All the best! |
Hi @grebdems 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%.
Really appreciate any input that may help solve this error, or at least understand when it occurs. Best, |
Hi @PaulaSchi
Have nice weekend! (and Valentines Day) |
Hi, 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:
(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! |
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! 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. 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!
The text was updated successfully, but these errors were encountered: