I am using an Eyelink 1000 with Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 12:45:02) [MSC v.1900 32 bit (Intel)] on win32, with a host computer and a display computer.
I had a previous error that was solved, but I suspect that it might be relevant, so I am linking it here: "Unable to share contexts" error when creating window (this is the reason for the first two lines in my code regarding pyglet)
I am trying to run this block of code:
import pyglet
pyglet.options['shadow_window']=False
from psychopy import visual, core, data, event, logging, gui, sound
from psychopy.iohub.client import launchHubServer
iohub_config = {'eyetracker.hw.sr_research.eyelink.EyeTracker':
{'name': 'tracker',
'model_name': 'EYELINK 1000 DESKTOP',
'runtime_settings': {'sampling_rate': 500,
'track_eyes': 'LEFT'}
}
}
io=launchHubServer(**iohub_config)
io_kb = io.devices.keyboard
eyetracker = io.devices.tracker
r = eyetracker.runSetupProcedure()
eyetracker.setConnectionState(False)
io.quit()
The problem here is that nothing appears on the screen when eyetracker.runSetupProcedure()
is called, although it seems that the eyetracker starts to connect (it says TCP/IP Link Open) on the host computer. I have verified that eyetracker
is getting the correct device. I have tried calling it without assigning it to a variable but that doesnāt work. I have also tried the following code:
window = #some code to create window #
window.winHandle.minimize()
eyetracker.runSetupProcedure()
window.winHandle.activate()
window.winHandle.maximize()
The window appears (with whatever I drew), but the calibration screen doesnāt come up. Pressing any key (C,V,Enter,Esc, etc.) just causes Python to crash (the āNot Respondingā error comes up).
The calibration screen appears when I run it via MATLAB, Experiment Builder, and EPrime. Not very sure what is going on here, especially since there are no error messages.
Thanks in advance!