Sorry to resurrect this old thread but is there a reliable way of getting psychopy to run with a keyboard on MacOS Catalina? I’m using 10.15.2 and psychopy 3.2.4. I’ve tried suggestions previously made such as ensuring psychopy has an entry for input monitoring within system preferences. I’ve downgraded to psychopy 3.2.3 then gone back to 3.2.4 but still get the same error. Below is what is produced when running the BART demo. Any suggestions would really be appreciated.
######### Running: /Users/mscase/Documents/psypy/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
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.
12.9358 WARNING User requested fullscreen with size [2560 1440], but screen is actually [1440, 900]. Using actual size
2020-01-04 18:31:20.190 python[39631:1816295] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Users/mscase/Documents/psypy/BART/bart_lastrun.py”, line 78, in
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
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