Specifying time in Excel crushes my online experiment

Description of the problem: Specifying time in Excel crushes my online experiment. I am designing a picture verification game where participants decide if the description they hear matches the picture on the screen. I want to show the stimuli first, then the options (yes vs no). As the duration of stimuli varies, I specify the starting and ending times of the options. Then I specify $beginning_time and ending $end_time of the options.
It gives the error: * ReferenceError: beginning_time is not defined

Hello,

how do you define the times? The error message points to spelling or definition error.

Best wishes Jens

I defined time in options like this:


and in excel like this:

I have two conditions. The times and the varible names (beginning_time and end_time) in both conditions are exactly the same. Condition1.xlsx works fine, but in Condition2.xlsx, it gives this error.

Are you using an outer loop to select which excel file to load? If so that doesn’t work online, unfortunately. It can only load condition files once at the start of the experiment, so it can’t select them on the fly. There are various ways around this using code components to achieve the same result, e.g., have on excel file with both conditions and then use a code component to select which set of columns to read from.

There is code (prepareResources) to load an Excel file or other resource on the fly. However, I prefer to specify which rows to use.

I use code component:

conditions = " "
if int(expInfo['participant'])%2:
    conditions = "condition1.xlsx"
else:
     conditions = "condition2.xlsx"

and in the loop’s conditions part, I wrote $conditions. The experiment was working when I use the VESPR tool to assign participants to two conditions. After including the time, the experiment crashes in condition2 but works in condition1.

I think there was a bug in the experiment. I deleted .git, HTML, and .js files and uploaded the experiment again as if it were a new experiment. It works now without a problem. Thank you!