PsychoPy not creating lastrun file

OS (e.g. Win10): Win 8.1
PsychoPy version (e.g. 1.84.x): 3.2.4
Standard Standalone? (y/n) Y
What are you trying to achieve?: Running the experiment

Hello, I am getting the following error when trying to run an experiment:
397.6954 INFO D:\Program Files\PsychoPy3\python.exe -m psychopy.scripts.psyexpCompile D:\Libraries\Documents\tf1\FYP experiment.psyexp -o D:\Libraries\Documents\tf1\FYP experiment_lastrun.py -v 3.2.4
D:\Program Files\PsychoPy3\python.exe: can’t open file ‘D:\Libraries\Documents\tf1\FYP experiment_lastrun.py’: [Errno 2] No such file or directory

The problem is it isn’t creating the lastrun when I select run, so I’m unable to run the experiment at all.

Hoping this is a simple fix and I’m missing something simple.

I was struggling with that error yesterday too - and still am. I use windows as well and have not found a solution (this summarises my issue from yesterday: (Help with Error please).

1 Like

To add to this, if I click compile script I get the error Failed to open. Not a file. I am guessing they are in some way related. It produces the error below in runner, which makes no sense as I am running in 2020.2.8

Generating PsychoPy script…

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
3.6417 WARNING Parameter ‘Data file delimiter’ is not known to this version of PsychoPy but has come from your experiment file (saved by a future version of PsychoPy?). This experiment may not run correctly in the current version.
3.6418 WARNING Parameter ‘Resources’ is not known to this version of PsychoPy but has come from your experiment file (saved by a future version of PsychoPy?). This experiment may not run correctly in the current version.
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “C:\Program Files\PsychoPy3\lib\runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 250, in
compileScript(args.infile, args.version, args.outfile)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 242, in compileScript
_makeTarget(thisExp, outfile, targetOutput)
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\scripts\psyexpCompile.py”, line 221, in makeTarget
script = thisExp.writeScript(outfile, target=targetOutput)
File “C:\Users\Jake\AppData\Roaming\psychopy3\versions\psychopy\experiment_experiment.py”, line 210, in writeScript
self_copy.flow.writeBody(script)
File “C:\Users\Jake\AppData\Roaming\psychopy3\versions\psychopy\experiment\flow.py”, line 243, in writeBody
entry.writeInitCode(script)
File “C:\Users\Jake\AppData\Roaming\psychopy3\versions\psychopy\experiment\routine.py”, line 99, in writeInitCode
thisCompon.writeInitCode(buff)
File "C:\Users\Jake\AppData\Roaming\psychopy3\versions\psychopy\experiment\components\text_init
.py", line 120, in writeInitCode
buff.writeIndentedLines(code % inits)
File “C:\Users\Jake\AppData\Roaming\psychopy3\versions\psychopy\experiment\params.py”, line 204, in str
self.valType)
TypeError: Can’t represent a Param of type extendedStr

1 Like

That’s very strange, extendedStr should definitely be represented in 2020.2.8, looking at the same lines in my own install I can’t see how self.valType could be extendedStr and still reach that point… The only thing I can think is if your install is accessing an older version of the base files, when you go to Tools->PsychoPy updates…, what version does it say you’re using? It could be that you installed 2020.2.8 there’s some preference or older install which is preventing it from using 2020.2.8 files

I ended up rebuilding the experiment and it worked perfectly fine. I have a feeling that something had corrupted on the students end before they sent it over to me. They were using 2020.2.5 at the time.

same problem more recently here: Local 'lastrun.py' file fails to update and prevents task running