[solved] PyGaze with Tobii tracker: "No module named ImageDraw" error
Attempting to run a very basic eye-tracking experiment based off the PyGaze eye-tracking template, I'm running into an error where PyGaze's libtobii attempts to import ImageDraw. The error I get is:
Unexpected error
line: 72
exception message: No module named ImageDraw
exception type: ImportError
Traceback:
File "dist\libqtopensesame\misc\process.py", line 139, in run
File "dist\libopensesame\experiment.py", line 347, in run
File "dist\libopensesame\sequence.py", line 47, in run
File "C:\Program Files (x86)\OpenSesame\plugins\pygaze_init\pygaze_init.py", line 198, in run
File "dist\pygaze\eyetracker.py", line 86, in __init__
File "dist\pygaze\_eyetracker\libtobii.py", line 72, in <module>
ImportError: No module named ImageDraw
This is on Windows 7, OpenSesame 2.9.7 (32 bit), using the pre-bundled PyGaze installation. The only change I've made to the default OpenSesame install is copying the tobii SDK modules into the OpenSesame folder.
It looks like libtobii
should be doing something like from PIL import ImageDraw
, as the PIL modules definitely seem to be included in the OpenSesame install and can be accessed as long as you import them through PIL
. I would be happy to edit the pygaze
files myself to use the correct imports, but it seems like only .pyc
files are provided in the bundled pygaze
, not the original .py
files?
Comments
After writing this post I realized I could work around the issue using an inline_script that added the PIL folder to the path:
So my immediate issue is solved for the moment and I was able to run through an example experiment.
Great, thanks for posting your solution!