psychopy.org | Reference | Downloads | Github

Experiment will not run anymore on different computer

Operating system: Mac OS Mojave (Version 10.14.6), initially it was Windows 10 (computer is in lab I cannot access)
PsychoPy version: PsychoPy3(PsychoPy v2020.1.2, have tried multiple versions from Experiment Settings dropdown menu)
Standard Standalone: I think so.

I’m trying to build a self-paced reading experiment with a multiple-choice intervention part in between. There are some extra code snippets as well. Some Excel files get imported as well. There might end up also being a separate survey on Qualtrics. Eventually, I’d like it to run on Pavlovia, since there is no in-person lab access.

What did you try to make it work?: Changing versions, deleting and modifying extra code, checking to make sure everything was in the proper directories, Googling, rebuilding the experiment from scratch, modifying and checking Excel files.

What specifically went wrong when you tried that?:
At first, the experiment would simply not start up at all. Later on, I got it to where it would ask for the participant information and then go to a blank grey screen before crashing.
It takes while to load too.

Stdout:

10.7579 INFO Loaded monitor calibration from [‘2020_03_30 15:51’]
Generating PsychoPy script…

Note: Dynamic code seems intended but updating is “constant”:
“$clause2”, in Routine clause2 (clause2_text: Text)
“$msg”, in Routine game_prac_RT (game_prac_RT_text: Text)
“$clause3”, in Routine clause3 (clause3_text: Text)
“$clr”, in Routine feedback_prac (feedback_prac_text: Color)
“$sentence+’\n’+’\n’+’\n’+words”, in Routine game_response_trial (game_response_trial_text: Text)
“$msg2”, in Routine feedback_game_main (feedback_game_main_text: Text)
“$clause1”, in Routine clause1 (clause1_text: Text)
“$sentence+’\n’+’\n’+’\n’+’…’”, in Routine game_sentence_read_trial (game_sentence_read_trial_text: Text)
"$question + ‘\n \n \n Press Y for yes or N for no’ ", in Routine spr_prac_q (spr_prac_q_text: Text)
“$clause0”, in Routine blanks (blanks_text: Text)
“$msg”, in Routine feedback_prac (feedback_prac_text: Text)
2020-05-28 10:06:59.089 python[15608:3243794] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)

Running: /Users/myagreene/Desktop/GIL_Experiment_Part1_C1_Updated_Version_lastrun.py

17.0150 INFO /Applications/PsychoPy3.app/Contents/MacOS/python -m psychopy.scripts.psyexpCompile /Users/myagreene/Desktop/GIL_Experiment_Part1_C1_Updated_Version.psyexp -o /Users/myagreene/Desktop/GIL_Experiment_Part1_C1_Updated_Version_lastrun.py -v latest
2020-05-28 10:07:05.621 python[15643:3244169] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
File “/Users/myagreene/Desktop/GIL_Experiment_Part1_C1_Updated_Version_lastrun.py”, line 132, in
text=clause0,
NameError: name ‘clause0’ is not defined

Experiment ended.

You have a bunch of issues that need to be addressed (as indicated in the error messages).

Every line in this section Note: Dynamic code seems intended but updating is “constant”: indicates that you are using a variable (e.g. $clause2 in the routine clause2's text component called clause2_text) yet you have set that field to be “constant” rather than saying that it will update on every repeat.

Because these are variables (that are presumably set in a code component, or come from a conditions file), they aren’t available at the start of the experiment. Yet because you have indicated that these fields are constant rather than changing, Builder assumes that the values will be available at the start of the experiment. This causes a contradiction and computers, being logic machines, don’t tolerate contradictions. So address all of the listed examples, and your experiment should run.

As a counterpoint to this, I often have variables in components that are set to constant. This works fine so long as the variables are given the value you want in a Begin Experiment code component that appears earlier than the component containing the variable.