Stuck at initializing

Hi, I am currently trying to launch an experiment online.

I am currently stuck on initializing the experiment online, although the code runs fine locally.

This file includes only one custom code, which is:

if expInfo['participant'] % 2 == 0:
    counter = ["Very Similar", "", "", "", "", "", "Very Dissimilar"]
elif expInfo['participant'] % 2 == 1:
    counter = ["Very Dissimilar", "", "", "", "", "", "Very Similar"]

Variable “counter“ is later plugged into slider.

What did you try to make it work?:

First, I made sure that this code works on builder.

Second, many people on this forum pointed out JavaScript may create problems, which should be related to the code above. I do not have any Python packages imported, and as far as I know, the operators should be compatible.

Third, I found the error message for the server, and it was 404 Not Found, which led me to think that the code does not connect to the server at all even before it reads the file to actually begin the experiment.

Lastly, I tried on four different computers to see if my computer has something to do with it, and all computer show the same error.

I am not sure what troubleshooting I can do further, or if this is something that can be resolved.

Thank you!

Hello @hyoji-ha

Did you successfully sync your experiment with the Pavlovia server? If the Platform version is unknown, then your JavaScript version of your experiment did not compile without errors despite running offline.

grafik

see here

You need to find the relevant code line to determine the problem. The above pasted code looks fine.

BTW. I am not sure if it is possible to change the slider labels online.

Best wishes Jens

expInfo[‘x’] returns a string ‘1’ rather than a digit 1 so you need to use int(expInfo[‘x’]) % 2

1 Like