PyGaze and Tobii EyeX eye tracker
Hello!
I’m new to OpenSesame and I’m trying to run an experiment including the Tobii EyeX. I’ve never used an eye tracker before, but I know that this one is quite simple and (from what I red in this forum) it can be integrated in OpenSesame.
Unfortunately, I couldn’t find a clear explanation about how to use the PyGaze item, except for this: http://osdoc.cogsci.nl/3.1/manual/eyetracking/pygaze/#pygaze-opensesame-plugins.
Please, can you help me to make it work providing me the correct sequence of the items and the way to include Tobii EyeX?
So far, every time I try to run my experiment this message occurs:
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libqtopensesame\misc\process.py", line 154, in run
exp.run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\experiment.py", line 439, in run
self.items.execute(self.var.start)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 103, in execute
self.run(name)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 122, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\sequence.py", line 51, in run
self.experiment.items.run(_item)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item_store.py", line 122, in run
self[name].run()
File "C:\Program Files (x86)\OpenSesame\share\opensesame_plugins\pygaze_init\pygaze_init.py", line 217, in run
**kwdict)
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\eyetracker.py", line 91, in __init__
from pygaze._eyetracker.libtobii import TobiiProTracker
File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\_eyetracker\libtobii.py", line 9, in <module>
import tobii_research as tr
ImportError: No module named tobii_research
Thank you!
Comments
Hi Martina,
You need to install the tobii-research package. The easiest way to do that is with the Python package manager:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you for your answer Sebastiaan!
Unfortunately I'm still having some iussue. When I find the tobii-research package in the Python package manager and click on "Install", the message "Failted to installed tobii-research" occurs. During this, the debug window shows this:
Collecting tobii-research
Using cached https://files.pythonhosted.org/packages/7c/0a/454ceaec763119fb9fbac763ba39ca47eb4dc9bc825ca243e7874722462e/tobii_research-1.5.0-cp27-cp27m-win32.whl
Installing collected packages: tobii-research
So I tried to type "pip install tobii-research" in the debug window, but this is the outcome:
File "", line 1
pip install tobii-research
^
SyntaxError: invalid syntax
I also downloaded the file tobii_research-1.5.0-cp27-cp27m-win_amd64.whl from the link that you gave me, but I don't know how to use a file with the .whl extension.
How can I solve this problem?
Thank you again!
Hi Martina,
Have you tried running OpenSesame as adminstrator? If you have, could you post the complete error message that you see in the debug window? (It seems that you posted only the beginning.)
If you want to do this from the debug window, you need to use pip as a Python library, like so:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan!
Thank you for your suggestion, I wasn't running OpenSesame as administrator (I did it and it worked, tobii-research package has been installed!).
However, now I have a different problem (I think). When I run my script using my Tobii, this message appear in the debug window:
Is there something else that I need to install in order to use my Tobii EyeX? Can you help me with this iussue?
Thank you!
Martina
Hi Martina,
It looks like you're using an old version of OpenSesame that includes older version of all the necessary libraries. So the Tobii functionality is probably simply broken.
Would it be an option to upgrade to the latest version of OpenSesame (currently 3.2.4)?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan!
Yes, I'm already using the last vesrion of OpenSesame (3.2.4).
Anyway, now a different message appears when I try to run your template for eye-tracking experiments; here is it:
I'm sorry to bother you again. What can I do in this case?
Thank you!
Martina
Hi Martina,
This appears to be a character encoding bug in PyGaze. If you select a logfile location that doesn't have any special (non-ascii) characters in it, does the error go away?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Interesting issue! Any ideas on how to solve it, Sebastiaan? (You're the encoding nerd )
Yes, I filed a bug report here!
Check out SigmundAI.eu for our OpenSesame AI assistant!
Just to update the issue on this platform too: The EyeX does not seem to be supported by the new Tobii SDK, which means the current
tobii
TRACKERTYPE is unlikely to work with the EyeX. (To be honest, I'm a bit confused by the specifics, but it seems like Tobii introduced a mechanism that actively prevents the EyeX from being used with the new SDK to collect data, as this is something they explicitly forbid in their end-user license agreement?)There exists an older implementation in the
tobii-legacy
TRACKERTYPE, which is based on the previous Tobii SDK. (I'd wager that that also isn't non-ascii safe, although I haven't gone back and checked it.) Unfortunately, using this TRACKERTYPE means you'd need all the old Tobii SDK software too, which is proprietary stuff available from Tobii only.For the whole discussion, see the issue that @sebastiaan filed on GitHub: https://github.com/esdalmaijer/PyGaze/issues/120
Sorry we couldn't be of more help!