Runtime/ioHub server error when running experiment

Psychopy won’t run any experiments. As soon as I launch it, the screen goes gray or white and then crashes after a couple seconds. I have tried multiple versions of psychopy.

MacOS Moneterey v12.2.1
PsychoPy v2022.1.0, v2022.1.1

ioHub Server Process Completed With Code: Negsignal.SIGSEGV
File “/Volumes/GoogleDrive/.shortcut-targets-by-id/1SEPdcarbYKSrUbeKO83hS8V-LWAjP7NU/forYewon/expV2/pilotExp2_lastrun.py”, line 90, 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.
################ Experiment ended with exit code 1 [pid:46469] #################

Hi there,

I had this issue a bit ago, and what resolved it for me was going to experiment settings → input → then switching ‘iohub’ to “psychotoolbox”.

Hope this helps!

Elise

1 Like

Hi there, I have the same issue. Switching to “psychotoolbox” didn’t help… MacOS is Big Sur 11.6.5, PsychoPy v2022.1.2

Could you try the 2022.1.3 release? We’ve made a few fixes but I’m not sure if this exact thing was fixed. The error message doesn’t really give us much of a clue what’s different on your machine (I’m afraid it works fine on mine). Have you set the app to have Accessibility access in the security/privacy settings?

I had the same issue, fixed by changing the keyboard backend (as Elise suggested above) to PsychToolbox.
The alternative is to give PsychoPy privileges to control your computer by way of Sys Preferences / Security / Accessibility. I’m not sure why iohub needs that.

PsychoPy v2022.1.3
MacOS 12.3.1

I’ve been having this issue as well. Changing input to PsychTookput + Adding PyschoPy to the list of allowed apps for Input Monitoring fixed it. But, I wonder if there is a simpler solution?

Hi,
I had the same problem before, and you can try changing the Keyboard Backend option in the Experimental Design option to “Pyglet.” I could display it normally after the change. I’m also using MacOS, and I hope this helps you.

Hi guys, I have also ran into the same issue. Did anyone manage to resolve it?

My project needs iohub, so I cannot change the input to another method.

Not sure if it is related, but it might help debugging.

I had the same issue when running code from the VisualStudio Code terminal (Sonoma 14.5, python 3.10, 2024.1.4), even when using sudo. Interestingly, when running the same code from the Mac OS Terminal.app, it works flawlessly (side note: for Mouse events even when Terminal.app is not allowed Input Monitoring. However Input Monitoring permission is needed for Keyboard events).

Could it be due to some security setting related to the spawning of subprocesses?

from psychopy.iohub import launchHubServer
iohub_config = {'eyetracker.hw.mouse.EyeTracker': {}}  
io = launchHubServer(**iohub_config)
1 Like