Error starting ioHub

macOS 12.6
Standalone PsychoPy 2022.2.4

I’m trying to teach my class how to use PsychoPy for Eyetracking, but when I run the iohub Stroop demo, I get the following error (“ioHub startup failed”):

Running: /Users/SomebodiesAccount/Documents/PsychoPy3 Demos/iohub/stroop_eyetracking/stroop_lastrun.py

388640.8299 INFO Loaded monitor calibration from [‘2019_10_23 10:04’]
2022-10-17 09:09:20.730 python[37508:3952053] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/d_/svpdy1848xj2xk001s765gh80000gq/T/org.opensciencetools.psychopy.savedState
1.1545 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
Traceback (most recent call last):
6.9192 WARNING launchHubServer: If using the iohub mouse or eyetracker devices, fullScr should be True.
ioHub Server Process Completed With Code: Negsignal.SIGSEGV
File “/Users/MattPetersonsAccount/Documents/PsychoPy3 Demos/iohub/stroop_eyetracking/stroop_lastrun.py”, line 89, in
ioServer = io.launchHubServer(window=win, **ioConfig)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/contrib/lazy_import.py”, line 118, in call
return obj(*args, **kwargs)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/client/connect.py”, line 256, in launchHubServer
return ioHubConnection(iohub_config)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/client/init.py”, line 296, in init
raise RuntimeError(‘Error starting ioHub server: {}’.format(self.iohub_status))
RuntimeError: Error starting ioHub server: ioHub startup failed.

I changed the preferences to allow PsychoPy to have access to Accessibility, which cleared up that error, but now I have a whole new set of errors:

question: Should Alert 4540 be considered a warning or an error? I hate to run PsychoPy in full screen mode during development, as it can lock up my machine if there is an error in the code.

################ Experiment ended with exit code 1 [pid:30781] #################
Generating PsychoPy script…

Alert 4540: Window mode is set to be windowed, but eyetracking requires the window to be full screen.
For more info see https://docs.psychopy.org/alerts/4540.htmlAlert 4510: A GazePoint eye tracker has been configured, but no calibration routine is present.
For more info see https://docs.psychopy.org/alerts/4510.html## Running: /Users/MattPetersonsAccount/Documents/PsychoPy3 Demos/iohub/stroop_eyetracking/stroop_lastrun.py ##
164.5015 INFO Loaded monitor calibration from [‘2019_10_23 10:04’]
2022-10-17 11:33:35.748 python[30799:100291] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/d_/svpdy1848xj2xk001s765gh80000gq/T/org.opensciencetools.psychopy.savedState
Error connecting to GP3 [Errno 61] Connection refused
Error during device creation …
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 708, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 874, in addDeviceToMonitor
dev_instance = DeviceClass(dconfig=dev_conf)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 165, in init
self._gp3get(“TIME_TICK_FREQUENCY”)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 203, in _gp3get
self._sendRequest(“GET”, ID, **kwargs)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 197, in _sendRequest
self._gp3.sendall(str.encode(rqstr))
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 699, in sendall
return _sendall(self, data_memory, flags)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 409, in _sendall
timeleft = __send_chunk(socket, chunk, flags, timeleft, end)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 349, in __send_chunk
data_sent += socket.send(chunk, flags, timeout=timeleft)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 722, in send
return self._sock.send(data, flags)
BrokenPipeError: [Errno 32] Broken pipe
Error during device creation …
Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 708, in createNewMonitoredDevice
dev_data = self.addDeviceToMonitor(dev_cls_name, dev_conf)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 874, in addDeviceToMonitor
dev_instance = DeviceClass(dconfig=dev_conf)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 165, in init
self._gp3get(“TIME_TICK_FREQUENCY”)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 203, in _gp3get
self._sendRequest(“GET”, ID, **kwargs)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/devices/eyetracker/hw/gazepoint/gp3/eyetracker.py”, line 197, in _sendRequest
self._gp3.sendall(str.encode(rqstr))
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 699, in sendall
return _sendall(self, data_memory, flags)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 409, in _sendall
timeleft = __send_chunk(socket, chunk, flags, timeleft, end)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 349, in __send_chunk
data_sent += socket.send(chunk, flags, timeout=timeleft)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/gevent/_socketcommon.py”, line 722, in send
return self._sock.send(data, flags)
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 642, in _addDevices
self.createNewMonitoredDevice(dev_cls_name, dev_conf)
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/iohub/server.py”, line 721, in createNewMonitoredDevice
raise ioHubError(‘Error during device creation …’)
psychopy.iohub.errors.ioHubError: ioHubError:
Args: (‘Error during device creation …’,)

GET_DEV_INTERFACE_ERROR: _getRPCInterface returned: None
!! Error starting ioHub: An existing ioHubConnection is already open. Use ioHubConnection.getActiveConnection() to access it; or use ioHubConnection.quit() to close it. Exiting…
0.7152 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
5.4496 WARNING launchHubServer: If using the iohub mouse or eyetracker devices, fullScr should be True.
0.9007 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
################ Experiment ended with exit code 0 [pid:30799] #################

Hi @Matt_Peterson,

The accessibility fix would have been my solution to your initial problem so I’m pleased that you’ve solved that.

The alert 4540 is a warning yes, it won’t stop anything from running. This error looks to be due to a connection issue. I notice that there is another warning here about not having a calibration routine present - do you get the same error if you do include a calibration routine?

Thanks,

Kim