Problem using keyboard

Hi erverybody,

i’m using psychopy with the following configuration:

  • mac, Catalina
  • emacs as python editor
  • python 3.7

I encounter problems when trying to access the keyboard. It is a bit inconsistant, but these days i cannot even anymore load keyboard. I get the following error:

#####################################
HIDBuildMultiDeviceList: Couldn’t open IOHIDManager.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.

Process Python illegal instruction: 4
#####################################

I’m really confused, and any help would be greatly appreciated,
rergards,
thibault

I’m betting this is Catalina. Does PsychoPy (or the Python instance you are using) have “accessibility permissions” in the security settings?

Also, are you using the standalone version or just running your experiment from terminal?

Dear Jonathan,

this is also my bet. But i’ve no idea how to solve it.
I run Python from emacs (and tried also directly from terminal, with the same error). I checked that python, terminal, psychopy have access to “input monitoring” in the security center, but apprently this is not enough… I think this is a problem of permission, though.

Using the standalone version, keyboard does work, but i cannot use the microphone, because i cannot load pyo from the standalone version (“image not found” message) : Pyo not found with catalina (mac)

Best
thibault
thibault

I feel entirely justified sticking with High Sierra right now.

When you run it from the terminal, and this is a wild shot in the dark, do you use a sudo command?

I have the same problem in Mojave with pyo on the newest version of Psychopy…

This does not change the result. Precisely, i then get: zsh: illegal hardware instruction

Looking into the report, i see:

Termination Signal: Illegal instruction: 4

Termination Reason: Namespace SIGNAL, Code 0x4

Terminating Process: exc handler [2645]

Application Specific Information:

BUG IN CLIENT OF LIBDISPATCH: dispatch_sync called on queue already owned by current thread

By the way, trying to launch the microphone from the terminal also give me an (a priori unrelated, but who knows…) error:

from psychopy.sound import backend_pyo

File “/usr/local/lib/python3.7/site-packages/psychopy/sound/init.py”, line 157, in

elif dev not in backend.getDevices(kind='output'):

File “/usr/local/lib/python3.7/site-packages/psychopy/sound/backend_pyo.py”, line 135, in getDevices

inputs, outputs = get_devices_infos()

File “/usr/local/lib/python3.7/site-packages/psychopy/sound/backend_pyo.py”, line 93, in get_devices_infos

devices = _query_devices()

File “/usr/local/lib/python3.7/site-packages/psychopy/sound/backend_pyo.py”, line 86, in _query_devices

info[v.strip().split(": ")[0]] = v.strip().split(": ")[1]

IndexError: list index out of range

I’m somewhat confused….

Best

thibault

Yeah, I think this is Pyo and Catalina not getting along. I’m afraid I have no idea how to fix it. I know sounddevice doesn’t have microphone implementation, I’m not sure whether the new PTB library does or not.