OS(MacOS12.6,M2)
PsychoPy版本(Mac版psychopy v2022.2.5)
**what i want to achieve?:I want the keyboard to work properly during the test run, including the esc key for unexpected exits.
****The problem occurs when I try:
When I clicked the run button, the computer screen showed instructions and then stopped. I can’t end the presentation of the instructions with a keyboard response, nor can I use the esc key to exit the running interface. I can only restart the computer by long pressing the computer power button.
It is worth noting that before such a situation occurs, there will be a flashback when you click to run. I solved the problem of flashback by loading psychopy into the auxiliary function of the mac system, but accompanied by keyboard failure.
Generating PsychoPy script…
############### Running: /Users/cracker/Desktop/test_lastrun.py ################
1841.5785 INFO Loaded monitor calibration from [‘2022_12_26 23:39’]
2023-01-19 11:44:24.154 python[1746:41709] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/lc/6jkpmgh95wxbxtblnxx0ybg80000gn/T/org.opensciencetools.psychopy.savedState
0.7629 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).
################# Experiment ended with exit code 0 [pid:1746] #################
Traceback (most recent call last):
0.8717 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).
File “/Users/cracker/Desktop/test_lastrun.py”, line 52, in
filename = thisDir + os.sep + u’data/%s%s_%s’ % (expInfo[‘participant’], expName, expInfo[‘date’])
KeyError: ‘participant’
################# Experiment ended with exit code 1 [pid:1720] #################