psychopy.org | Reference | Downloads | Github

Error when trying to open .psyexp file

Hi all…

I am helping a colleague to use PsychoPy and she had her experiment all up and running but today when she tried to open the file it will not open. It starts to open PsychoPy but then ‘PsychoPy2 Error’ appears and it shuts down. This is using PsychoPy2 on Mac - version 1.84.1.

The experiment does open and run in coder but just not in builder.

Below are the logs from console. They mean nothing to me but maybe they might shed light on the issue to one of you.

Thanks
Matt

29/09/2016 11:02:43.953 PsychoPy2[5172]: Failed to load /Users/mattjones/Desktop/BETask/beTask.psyexp. Please send the following to the PsychoPy user list
29/09/2016 11:02:43.953 PsychoPy2[5172]: Traceback (most recent call last):
29/09/2016 11:02:43.954 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1473, in fileOpen
29/09/2016 11:02:43.954 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/experiment.py", line 596, in loadFromXML
29/09/2016 11:02:43.954 PsychoPy2[5172]: KeyError: 'response_2'
29/09/2016 11:02:43.988 PsychoPy2[5172]: Traceback (most recent call last):
29/09/2016 11:02:43.988 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/__boot__.py", line 381, in <module>
29/09/2016 11:02:43.989 PsychoPy2[5172]:     _run()
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/__boot__.py", line 362, in _run
29/09/2016 11:02:43.989 PsychoPy2[5172]:     exec(compile(source, path, 'exec'), globals(), globals())
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/psychopyApp.py", line 60, in <module>
29/09/2016 11:02:43.989 PsychoPy2[5172]:     app = PsychoPyApp(0, showSplash=showSplash)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/_psychopyApp.py", line 107, in __init__
29/09/2016 11:02:43.989 PsychoPy2[5172]:     self.onInit(**kwargs)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/_psychopyApp.py", line 254, in onInit
29/09/2016 11:02:43.989 PsychoPy2[5172]:     self.showBuilder(fileList=exps)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/_psychopyApp.py", line 436, in showBuilder
29/09/2016 11:02:43.989 PsychoPy2[5172]:     self.newBuilderFrame(fileName=fileName)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/_psychopyApp.py", line 426, in newBuilderFrame
29/09/2016 11:02:43.989 PsychoPy2[5172]:     fileName=fileName, app=self)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1013, in __init__
29/09/2016 11:02:43.989 PsychoPy2[5172]:     self.fileOpen(filename=fileName, closeCurrent=False)
29/09/2016 11:02:43.989 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1485, in fileOpen
29/09/2016 11:02:43.989 PsychoPy2[5172]:     self.updateAllViews()  # if frozen effect will be visible on thaw
29/09/2016 11:02:43.990 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/builder.py", line 1718, in updateAllViews
29/09/2016 11:02:43.990 PsychoPy2[5172]:     
29/09/2016 11:02:43.990 PsychoPy2[5172]:     self.flowPanel.draw()
29/09/2016 11:02:43.990 PsychoPy2[5172]:   File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/app/builder/flow.py", line 644, in draw
29/09/2016 11:02:43.990 PsychoPy2[5172]:     thisTerm = self.loops[thisLoop]['term']
29/09/2016 11:02:43.990 PsychoPy2[5172]: KeyError: 'term'
29/09/2016 11:02:44.049 PsychoPy2[5172]: PsychoPy2 Error

I notice that I can actually open the file from within Builder and it then runs but the GUI doesnt show any of the loops and routines and at it just looks like a new and untitled experiment file. But when I click run it actually runs the experiment. It does mean that I cannot edit the file though.

It also appears this person is having the same issue:

This is a duplicate of the issue below. I’ve posted the fix at the bottom of that thread.