psychopy.org | Reference | Downloads | Github

Local 'lastrun.py' file fails to update and prevents task running

MacOS Catalina 10.15.6:
PsychoPy version2020.2.10:
**Standard Standalone? y
What are you trying to achieve?:

I’ve been working on a project for a while on builder which I have successfully used online through Pavlovia multiple times. However, recently the .psyexp local file has been corrupted such that every time I try and run it, an old bit of javascript code pops up in my compiled python script and causes the code to crash. Specifically, the error I get is:
File “/Users/eleanorholton/Documents/GitHub/goalmaintenance/task/submarineTask_fixBug_lastrun.py”, line 3975
if (psychoJS.eventManager.getKeys({keyList:[‘q’]}).length > 0) {
^
IndentationError: unexpected indent

However this piece of javascript which was inside a JS code snippet has been deleted from the builder. Only whenever I try to run it or compile the python script, the line re-appears inside the python script. However, when I compile it to javascript the line is correctly deleted. It seems that the lastrun.py script fails to update given the edits I’ve made to the builder, and prevents it from running.

What did you try to make it work?:
Things I’ve tried:
-Deleting and re-compiling all the python and js scripts
-Renaming the .psyexp script and saving it to a different folder
-Downloading my psyexp script from pavlovia again, and saving to a new folder

What specifically went wrong when you tried that?:
Every time, when I recompile the script to python, that line of code re-appears. A similar problem is mentioned in a comment section on a previous page, but their fix (renaming the file) doesn’t seem to work for me.

1 Like

Same problem in just changing anything in builder. Won’t update anymore. Only old file shows up in coder. Try to save as something else and won’t run because it wants a last run file it won’t create. Seem to have stuffed up preferences but tried every combination and nothing works to get anything updated anymore. All changes saved in builder, from close to reopen, but nothing changes in script, just keeps stuff that isn’t in builder anymore.
Found could get script updated with Compile (F5), can see changes in Coder, but still only runs old script from Builder and Coder. Try to delete last run file and won’t run at all. Tried complete uninstall and reinstall but still does the same, won’t run with any saved edits any which way

Same problem recently here: PsychoPy not creating lastrun file