ERROR MAC os Monterey V. 12.0.1 Psychopy version 2021.2.3

Hi, I have an error when I change the color on the screen, psychopy in automatic close and send this message:

Translated Report (Full Report Below)

Process: PsychoPy [9235]
Path: /Applications/
Identifier: org.opensciencetools.psychopy
Version: 2021.2.3 (2021.2.3)
Code Type: X86-64 (Translated)
Parent Process: launchd [1]
User ID: 501

Date/Time: 2021-10-28 13:07:43.2039 -0500
OS Version: macOS 12.0.1 (21A559)
Report Version: 12
Anonymous UUID: CD20AB7E-0EB2-B384-8817-F4CAB1175842

Sleep/Wake UUID: A7F36DD3-95E2-4C0C-8714-1679345C5423

Time Awake Since Boot: 14000 seconds
Time Since Wake: 3950 seconds

System Integrity Protection: enabled

Crashed Thread: 0 PTB mainthread Dispatch queue:

Exception Codes: KERN_INVALID_ADDRESS at 0x0000c000000166e0 → 0x00004000000166e0 (possible pointer authentication failure)
Exception Codes: 0x0000000000000001, 0x0000c000000166e0

Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [9235]

VM Region Info: 0x4000000166e0 is not in any region. Bytes after previous region: 69887707932385 Bytes before following region: 35184371996960
commpage (reserved) 1000000000-7000000000 [384.0G] —/— SM=NUL …(unallocated)
—> GAP OF 0x5f9000000000 BYTES
MALLOC_NANO 600000000000-600008000000 [128.0M] rw-/rwx SM=PRV

I would like to know how to fix it.

Thank you

This seems to be a crash in the psychtoolbox thread used for keyboard event monitoring. What type of processor does your mac have, an Intel or a M1? Wondering if the issue is with macOS 12 or the processor type.

To test if it is the psychtoolbox thread, can you try running a Coder demo that does not require psychtoolbox, like demos/coder/basic/ and see if it runs successfully or not?

Thank you

1 Like

My processor is M1.
If I run a coder dem that does not requiere psychtoolbox, it runs.

Thank you.

Excuse me. My chip is M1 pro. It can not display text, pictures, etc., in the 2.3 version. Do you have such a problem? The error message is:

Generating PsychoPy script…

########## Running: /Users/liuyaqi/Desktop/preexp/ ##########
3730.7726 INFO Loaded monitor calibration from [‘2022_02_02 21:11’]
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.
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.
0.6176 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).
3.8860 WARNING User requested fullscreen with size [1024 768], but screen is actually [1512, 982]. Using actual size
5.0406 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

5.9566 WARNING Couldn’t measure a consistent frame rate.

  • Is your graphics card set to sync to vertical blank?
  • Are you running other processes on your computer?

2022-02-07 12:09:53.217 python[2178:69731] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/mn/x552f7z15ql6q0zcxvcttcbh0000gn/T/org.opensciencetools.psychopy.savedState
Traceback (most recent call last):
File “/Applications/”, line 406, in getBuffer
File “/Applications/”, line 447, in init = hid.Keyboard(kb_id) # a PTB keyboard object
File “/Applications/”, line 137, in init
File “/Applications/”, line 145, in _create_queue
None, 0, num_slots, flags, win_handle)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/liuyaqi/Desktop/preexp/”, line 84, in
defaultKeyboard = keyboard.Keyboard()
File “/Applications/”, line 190, in init
buffer = _keyBuffers.getBuffer(devId, bufferSize)
File “/Applications/”, line 410, in getBuffer
raise OSError("Failed to connect to Keyboard globally. "
OSError: Failed to connect to Keyboard globally. You need to add PsychoPy App bundle (or the terminal if you run from terminal) to the System Preferences/Privacy/Accessibility (macOS <= 10.14) or System Preferences/Privacy/InputMonitoring (macOS >= 10.15).

Experiment ended.