psychopy.org | Reference | Downloads | Github

Running demo_eye_tracker on desktop psychopy

If this template helps then use it. If not then just delete and start from scratch.

OS: various windows and mac
PsychoPy version: 2020.2.10
Standard Standalone? (y/n) If not then what?: standalone and anaconda
What are you trying to achieve?:

I am trying to run demo_eye_tracking on desktop versions of psychopy with some interns (they all either downloaded psychopy on mac/windows standalone/anaconda) so they can adapt the tpronk code for their own online eyetracking experiments.

The first issue comes about when we try to run the experiment on the desktop instead of pavlovia. We have tried to run both demo_eye_tracking and demo_eye_tracking2, either cloned from github or run from the in-built psychopy demos, and we always get the same error: that the letters “ale” appear on line 31 of the code, which crashes the experiment. I am able to delete the code in coder view, but I don’t know where the error is in the builder, so I don’t know how to save the amendment of the error.

Second, if I do run the amended demo_eye_tracking_lastrun.py from the coder, I am able to enter a participant number, then it goes to the “Downloading additional resources. One moment please…” page. But then it just freezes on that page indefinitely. I am not seeing any error messages, and then I just escape and it ends.

I was wondering if this might be because I should be running the experiment from the builder, but I’m not able to because I don’t know where the “ale” typo is in the builder? Or I was hoping you might have another idea.

Thanks for your time!

Hey Kerblooee,

Thanks for your questions! I’m afraid that demo_eye_tracking2 only works online (via PsychoJS) and not offline (via PsychoPy). This is because I’ve used some very specific software libraries (WebGazer) that aren’t available for Python. We’re working towards a dual solution (Python & JS) that allows the eye-tracking-via-webcam via a builder component, but that’s work in progress.

Best, Thomas

PS - Inspired on your question I added a little note to the demo_eye_tracking2 README to clear up it only works online.

Hi kerblooee,

If you want to use one of eye trackers supported by PsychoPy3 offline (using python) please download the latest version of Psychopy (2021.1.0) and try the
Feature Demos/iohub/visualsearch_eyetracker Builder demo.

For Coder demo’s, please see demos/coder/iohub/eyetracking

Info on PsychoPy3 Python supported eye trackers:

https://www.psychopy.org/api/iohub/device/eyetracker.html

1 Like

Thanks, that would explain my problems, then :slight_smile:

Hi sol,
Thanks, this looks like a good solution for a conventional eye tracking experiment. But it looks like there is currently no way to adapt the webcam-based eye tracking demo, which is what I was trying to do with my students (while in-person testing is still restricted). This will be good to keep in mind for the future, though!

Sorry, I misunderstood your orignal question. Thank you.