File won't open

I’m on MacOS Monterey using PsychoPy version 2022.2.2. I was working on a builder script and everything was working fine. I went to open the script a day after working on it, and it no longer opens. I am getting the following error:

Traceback (most recent call last):
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 881, in OnFileHistory
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 723, in fileOpen
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 967, in updateAllViews
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.8/psychopy/app/builder/builder.py”, line 3481, in draw
KeyError: ‘term’

Any help would be appreciated.

Does PsychoPy open, or is it only your specific experiment?

Psychopy opens, but just not that file. I was able to fix it by modifying the code builder.py: I added a try/except block around line 3481. I’m guessing that’s not a good long-term solution, but it works for now!