Sorry for the lack of information. I’m new to this type of forum.
To build on from my prior post the code for the eye-tracking is done in code snippets in individual routines throughout the experiment when eye-tracking is necessary as it is not needed on all of the trials / routines.
The initial code at the beginning of the experiment is a code snippet to check and make sure there is an eye-tracker and if so to start the calibration procedure is as follows:
eyetracker =False #will change if we get one!
if expInfo[‘Eye Tracker’]:
from psychopy.iohub import EventConstants,ioHubConnection,load,Loader
from psychopy.iohub.util import NumPyRingBuffer
from psychopy.data import getDateStr
# Load the specified iohub configuration file converting it to a python dict.
io_config=load(file(expInfo[‘Eye Tracker’],‘r’), Loader=Loader)
# Add / Update the session code to be unique. Here we use the psychopy getDateStr() function for session code generation
# Create an ioHubConnection instance, which starts the ioHubProcess, and informs it of the requested devices and their configurations.
except Exception, e:
print "!! Error starting ioHub: ",e," Exiting..."
Then on individual trials and/or routines when eye tracking is necessary in a code snippet I placed this under the Begin Experiment tab:
And under the End Routine of the same snippet:
Just to reiterate the calibration procedure runs fine and it isn’t until I try to go back into the main experiment that I get the “python.exe has stopped working” message before I even get to the first screen of the experiment. Also, after some more testing it did work once though I haven’t changed anything since then (i.e. the code from above) and I’m getting the same “python.exe has stopped working” message.
Also it is worth mentioning that I took this code from the eye-tracking stroop demo that comes with psychopy, since it seemed to work fine and I figured it would be simple to build up from there. Just to note I am using the latest version of psychopy and am running this on a Windows computer.