Experiment just comepletly disappeared

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 1.90.2
Standard Standalone? (y/n) If not then what?:
So I was doing my experiment and it was lagging a bit so I saved and turned it off, but now when I open the file it’s completly empty. there are no routines saved, no timeline, nothing.
Aslo this message shows in the Coder view in “Output”:

Failed to load C:\Users\natal\Desktop\experiment\delayedsorted.psyexp. Please send the following to the PsychoPy user list
Traceback (most recent call last):
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py", line 1574, in fileOpen
    self.exp.loadFromXML(filename)
  File "C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\experiment\_experiment.py", line 507, in loadFromXML
    self._doc.parse(filename)
  File "C:\Program Files (x86)\PsychoPy3\lib\xml\etree\ElementTree.py", line 597, in parse
    self._root = parser._parse_whole(source)
  File "<string>", line None
xml.etree.ElementTree.ParseError: no element found: line 1, column 0

help? It’s gonna take a lot of time to redo everything…

Open the file in a text editor and see what it contains (and post a small selection here).

It sounds like you may have over-written the .psyexp XML-format file with other content (e.g. what should have been in your .py file). If so, then there is no solution other than to revert to your latest backup. You do have a backup? :grimacing:

there is absolutly nothing in the psyexp file, but there seems to be a lot in the py file?
i.e.

Initialize components for Routine “test11”

test11Clock = core.Clock()
wordhirastimulus1 = visual.TextStim(win=win, name=‘wordhirastimulus1’,
text=‘default text’,
font=u’Arial’,
units=‘cm’, pos=(0, 2), height=2, wrapWidth=None, ori=0,
color=u’white’, colorSpace=‘rgb’, opacity=1,
depth=0.0);
showresponse1 = visual.TextStim(win=win, name=‘showresponse1’,
text=None,
font=‘Arial’,
units=‘cm’, pos=(0, -2), height=2, wrapWidth=None, ori=0,
color=‘white’, colorSpace=‘rgb’, opacity=1,
depth=-2.0);
import string
allLetters = list(string.ascii_lowercase)
answercorrect1 = visual.TextStim(win=win, name=‘answercorrect1’,
text=‘default text’,
font=u’Arial’,
pos=(0, 0), height=0.1, wrapWidth=None, ori=0,
color=u’gray’, colorSpace=‘rgb’, opacity=1,
depth=-4.0);

I don’t know how you might have overwritten the .psyexp file, but the .py file will run the experiment from the Coder view (there is a green “run” button there just as there is in the Builder view). Of course this will only be useful to you if the experiment development was complete. If you need to make changes or add features, that will be very cumbersome if you need to edit this Python file rather than the Builder graphical representation.

Again, I’d recommend going back to the last backup you have of your .psyexp file and work from there.

alright, thank you :slight_smile: