Local vs Online Pavlovia ReferenceError

URL of experiment: Sign in · GitLab

Description of the problem:

I am able to run this experiment locally all the way through however when running using Pavlovia I encounter a ReferenceError. I deleted the JS and index files from GitLab and resynced the experiment multiple times. The ReferenceError is happening 4-5 procedures into the experiment with a variable called ‘FocalAttribute’ which isn’t accessed until later. I did not fiddle with any of the JS code and have used only Auto → JS for everything that I have done. Please let me know what else I may provide to help explain this issue further. Thank you in advance!

Put FocalAttribute = 0 in Begin Experiment

That did not fix it, unfortunately. FocalAttribute is a parameter from a Condition File later in the experiment. Not sure why it would need to be defined earlier.

If it’s in a conditions file then:

  1. Make sure it doesn’t get used before the loop, for example by having set the component to constant instead of update each repeat.

  2. Make sure you don’t try to alter the value of the variable in a code component.

I tried both of those. They haven’t worked either. The Error pops up the second the first Condition File is being used. However, that procedure and condition file do not contain FocalAttribute. They both contain FocalCondition, which is completely different.

I would appreciate any support with this. It’s an issue that seems relatively insignificant but is affecting the whole experiment.

Have you tried running your experiment in an incognito tab (to check you are looking at the latest version)?

If I could see your code then I would search though for all references of FocalAttribute to see if it appears before the loop.

I am piloting the experiment as I don’t want to use credits yet. I have attached the .psyexp and lastrun.py files to this message. Let me know what you think. Thank you for your support!

BIAT_5_IL1_lastrun.py (753.3 KB)
BIAT_5_IL1.psyexp (298.0 KB)

You’ve set it to constant here

and here

Thank you. That fixes that problem. Now, I have issues with using “win.color = ANY_COLOR”. It immediately turns the screen black even when the color is meant to be set to white, lightgray, or anything else. The second I remove the part of the code responsible for changing colors the experiment runs as normal but at the color change it just defaults to black.