URL of experiment: Pavlovia
Maddie Quirk / attentional_history3 · GitLab
Description of the problem:
I’ve come across several threads detailing this same problem, but none of the suggested solutions I have tried implementing have worked. My project works perfectly fine again on Psychopy and I was encountering a freezing error on pavlovia before that I actually can’t tell if it is fixed or not because I can no longer get to the actual experimental trials of my study. I have been testing this study on Pavlovia for several weeks now and this is the first time I have ever gotten this import conditions error that my conditions excel file is not supported (see below).
I’ve read that this could be due to a nested loop where the inner loop can’t access this imported file, but I haven’t changed anything about this structure since I have started testing it and have never had this issue. I also saw that online the selected_Rows variable has to be 0:1 to access a 0 index, so I tried implementing an if statement in the JS to set my $select_trial variable to “0:1” if the index was 0 - that didn’t work. I have also now deleted my experiment several times on Pavlovia and reuploaded to no avail. I also tried changing my .xlsx file to a .csv and still got the same error.
The flow of my main experimental trials is pictured below:
My excel file controls proportions of distractor-present trial presentation, so I would really really like to not have to hard code in all the variables of my trials. Especially when importing my conditions has worked in all previous versions of this exact task. The only thing I have changed is some of the code controlling the trial selection in the condSelect_exp routine. The javascript translation is pasted below.
trial_id += 1;
rand_array = randint(0, 2).toString();
trialTracker.append(rand_array);
runTrials += 1;
duplicateCheck = false;
trackerSize = trialTracker.length;
if ((expInfo["condition"] === "experimental")) {
if (((trial_id % 3) === 0)) {
select_trial = randint(0, 9).toString();
} else {
select_trial = randint(9, 27).toString();
}
} else {
if ((trackerSize >= 2)) {
if (((trialTracker[(trackerSize - 1)] === "0") && (trialTracker[(trackerSize - 2)] === "0"))) {
duplicateCheck = true;
}
}
if ((distractorPresent.length === 0)) {
shuffle(distractorAbsent);
select_trial = distractorAbsent[0].toString();
distractorAbsent.pop(0);
} else {
if (((distractorAbsent.length === 0) && (duplicateCheck === false))) {
shuffle(distractorPresent);
select_trial = distractorPresent[0].toString();
distractorPresent.pop(0);
} else {
if (((rand_array === "0") && (duplicateCheck === false))) {
shuffle(distractorPresent);
select_trial = distractorPresent[0].toString();
distractorPresent.pop(0);
} else {
shuffle(distractorAbsent);
select_trial = distractorAbsent[0].toString();
distractorAbsent.pop(0);
}
}
}
if ((runTrials === 27)) {
distractorPresent = [0, 1, 2, 3, 4, 5, 6, 7, 8];
distractorAbsent = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26];
runTrials = 0;
}
}
With these variables all defined initially at the beginning of the experiment in the select_trial2 component:
runTrials = 0;
distractorPresent = [0, 1, 2, 3, 4, 5, 6, 7, 8];
distractorAbsent = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26];
trialTracker = [];
I don’t believe the code should be producing this error though, but I am yet again at another loss and pretty desperate to resolve this as soon as possible. Any help would be so greatly appreciated.