psychopy.org | Reference | Downloads | Github

Experiments crash using Mac OS Catalina

There seems to be a fatal error running PsychoPy under macOS Catalina 10.15 (related to using the keyboard?). For example, using PsychoPy 3.2.4, in trying to run the BART demo, I get

Generating PsychoPy script...
#### Running: /Users/benjamv/Documents/PsychoPy3 Demos/BART/bart_lastrun.py ####
PsychHID-ERROR: Could not enumerate and attach to all HID devices (HIDBuildDeviceList(0,0) failed)!
PsychHID-ERROR: One reason could be that some HID devices are already exclusively claimed by some 3rd party device drivers
PsychHID-ERROR: or applications. I will now retry to only claim control of a hopefully safe subset of devices like standard
PsychHID-ERROR: keyboards, mice, gamepads and supported USB-DAQ devices and other vendor defined devices and hope this goes better...
PsychHID-INFO: That worked. A subset of regular mouse, keyboard etc. input devices and maybe some vendor defined devices will be available at least.
INTERNAL PSYCHTOOLBOX ERROR
    error:                PsychError_system
    general description:  Error reported by a system call
    specific description: Failed to create event queue for detecting key press.
    module name:          PsychHID
    subfunction call:     KbQueueCreate
    file name:            ./PsychSourceGL/Source/OSX/PsychHID/PsychHIDStandardInterfaces.c
    function name:        PsychHIDOSKbQueueCreate
    line number:          956
PsychHID:KbQueueCreate: See error message printed above.
10.0258     WARNING     User requested fullscreen with size [2560 1440], but screen is actually [5120, 2880]. Using actual size
2019-10-26 09:52:43.602 python[7115:519111] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
  File "/Users/benjamv/Documents/PsychoPy3 Demos/BART/bart_lastrun.py", line 78, in <module>
    defaultKeyboard = keyboard.Keyboard()
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/hardware/keyboard.py", line 166, in __init__
    buffer = _keyBuffers.getBuffer(devId, bufferSize)
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/hardware/keyboard.py", line 306, in getBuffer
    kb_id=kb_id)
  File "/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/hardware/keyboard.py", line 334, in __init__
    self.dev = hid.Keyboard(kb_id)  # a PTB keyboard object
  File "psychtoolbox/hid.pyc", line 137, in __init__
  File "psychtoolbox/hid.pyc", line 145, in _create_queue
FileNotFoundError: [Errno 2] No such file or directory

Many people have had similar problems with Catalina (myself included). This thread may be of interest to you. Hope it helps!

1 Like

Problem was solved by downgrading to version 3.2.3 and re-allowing input access, see Keyboard psychtoolbox/hid failing with Mac OS Catalina update
Not sure what happened between 3.2.3 and 3.2.4 which causes the problem, but would obviously be great to see support for Catalina in figure versions :slight_smile:

EDIT: This solution Keyboard psychtoolbox/hid failing with Mac OS Catalina update allowed me to use 3.2.4 under OS Catalina

I don’t think anything relevant changed in PsychoPy between these versions. Possibly the security has changed in Catalina, but it might just be that from now, for each version, we have to add PsychoPy back as an app allowing inputs (if Catalina treats each version as a new application). Sigh