I tried to open my experiment and received the following error:
v1.90.0
Traceback (most recent call last):
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\app\builder\builder.py”, line 1589, in fileOpen
self.exp.loadFromXML(filename)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\experiment_experiment.py”, line 436, in loadFromXML
self._doc.parse(filename)
File “C:\Program Files (x86)\PsychoPy2\lib\xml\etree\ElementTree.py”, line 656, in parse
parser.feed(data)
File “C:\Program Files (x86)\PsychoPy2\lib\xml\etree\ElementTree.py”, line 1642, in feed
self._raiseerror(v)
File “C:\Program Files (x86)\PsychoPy2\lib\xml\etree\ElementTree.py”, line 1506, in _raiseerror
raise err
ParseError: not well-formed (invalid token): line 1, column 0
I understand this is because I saved it from the Coder view and overwrite the experiment file. I can run the experiment using the experiment_lastrun.py file, but is there any way I can retrieve the builder view?
Hi @oliviad. Have you tried restoring the file? Right click the file you saved over, go to Properties > Previous Versions then select the file version you want to restore, and click “Restore”.
The facility where the experiment gets saved inside the psydat data file was turned off for most recent versions*
The options here would be:
as David suggests, to fetch an older version if there’s any form of backing up on the computer (dropbox and windows, for instance both include backing up systems but on windows I think that requires the user to set it up manually)
change the file extension of the script to .py and run as a Python script instead of a Builder experiment
Olivia, please upload one of your previous .psydat files and the current (broken) .psyexp file to see which of these solutions will work.
cheers,
Jon
* for a while it was causing problems with unicode inside the experiments but I think that’s fixed now, so we should probably reactivate the system
That psyexp file was completely empty, so I don’t know that happened either. Glad you fixed it using OneDrive. (Good idea to keep important files in OneDive or Dropbox for exactly this reason)
Out of interest, what version of PsychoPy were you using?