The changes I made to get your experiment working were:
Changed \ to / in your spreadsheets to solve
Use foreslashes not backslashes in file paths
Windows file paths use backslashes (\) to separate the folders in the path.
This doesn’t work online because Linux-base servers use slashes (/) instead. Worse than that, the backslash character is used to mark the beginning of an “escape sequence” so the following character is interpreted by JavaScript as something else.
Here are some examples:
\n new line
\t tab
\' or \" Literal single or double quotes
\\ Literal \
\b backpace
\xHH characte…
Changed Stimuli to stimuli in sound_1 and sound_2
Coding is case sensitive
Python and JavaScript are both case sensitive languages. The commands you write in code components must be of the correct case, and the cases of the names of your components and variables must match. For example, you could have three distinct variables called item, Item, and ITEM (don’t do this).
In addition, when running online you also need to use the correct case for your filenames. Locally you can have item.png in your spreadsheet and your experiment will successful…
Removed $random(4) * 200 and $random(4) * 400 from the selected rows fields. I don’t know what they are supposed to do. Locally it seems to produce a list of four random numbers, e.g. [113.92972671 65.91239136 118.54189524 10.72040802]. Online it produces a single random number in that range. Neither make sense for selected rows.
For now, I’ve replaced it with a code component in each routine which breaks the loop after 4 iterations:
if loopStimul.thisN == 3:
loopStimul.finished = True
You can try it here. EXP1 [PsychoPy]
Since the loops have a fixed random seed then it plays the say four images eight times. Are your two spreadsheets identical?
This tip tells you about how selected rows works. Either a list of integers or a string of two integers separated by a colon.
Avoid multiple spreadsheets
One way of counterbalancing blocks in an experiment is to have an outer loop which points to a spreadsheet which contains the names of different spreadsheets to use in an inner loop. The main issue with this is that if you have multiple spreadsheets with the same columns and you want to make a change, you have to make it to all of them. The other more minor issue is that you may have to specify the spreadsheets as additional resources in Experiment Settings / Online.
…
1 Like