Hi everyone.
I’m having trouble with counterbalancing in the online version of my experiment. Even though the code I wrote for counterbalancing worked in Psychopy locally (in Python), it fails to convert to Javascript so it can’t be uploaded to Pavlovia.
I have 2 different counterbalances in my experiment. Both counterbalances place the random half of the participants in one condition and the other half in the other condition. And participants are supposed to see different instructions in these conditions, so it’s not a counterbalance simply for order but for different types of instructions.
Here are the screenshots of the codes that make this possible:
I created 2 different code components in the Begin Experiment frame to place participants into these conditions. And I have 4 excel files for the different group conditions: group_A.xlsx, group_B.xlsx, group_1.xlsx, and group_2.xlsx which connect to the excel files through loops I created for counterbalancing.
The codes for counterbalancing are the following:
The curious issue is that this code works in Python/Psychopy without problem, but when I try to compile the experiment into JS code, I stumble with an error that says “selectGroup” is not defined.
If anyone has an idea about what might cause this, I’d highly appreciate your insights. Thank you.