| Reference | Downloads | Github

Name error: name 'event' is not defined

OS (e.g. Win10): Mac OS 10.15.4
PsychoPy version (e.g. 1.84.x): v2020 1.2
*Standard Standalone? (y/n) y
What are you trying to achieve?:

Experiments no longer work after update.
They produce the following error

  File "/Users/marcbuehner/Dropbox/FAPESP_TimePerception/Reproduction/", line 295, in <module>
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
  File "/Applications/", line 221, in getKeys
    name = event.getKeys(keyList, modifiers=False, timeStamped=False)
NameError: name 'event' is not defined
##### Experiment ended. #####

I cannot work out why it does that – is it some backwards incompatibility issue?


Hi Marc,

To fix this issue, you need to go to your System Preferences > Security & Privacy > Input Monitoring and allow PsychoPy3.

Hope this helps :slight_smile:


1 Like