Hi everyone! I’m working on an experiment where in the main trial loop, I pull a top word and bottom word out of an excel sheet and display one or both of them over a fixation cross. The experiment runs perfectly locally but when uploading to Pavlovia, I’ve run into some trouble. The experiment initializing and runs, but when it gets to where the trial loop starts, I get the error message * TypeError: topWord is undefined (where topWord is one of the categories from the Excel sheet that is set as the condition for the trial loop.) Any ideas what can be the issue here?
[Barnard Vision Lab / Semantic Task 3.0 · GitLab](Here is the github folder if that’s useful)
Are you making any edits to topWord in code? Variables set by spreadsheets can’t be edited online so you’d need to copy the value to a new variable first.
Hi! Thank you for your comment. I’ve updated the code so the variable loads into a new variable, but now I’m getting TypeError: top is undefined OR TypeError: bottom is undefined. It seems to change when I rerun the experiment. Sometimes it pops up before the trials even start, and sometimes we get through one trial before it shows up. Any ideas what’s going on there?
Here is the relevant code if it’s helpful. Did I not copy the variable correctly? The textbox showing the stimuli uses $word.
@genvisionlab I was facing same problem. Luckily i saw your post thanks for sharing this with us. Great work you have done.
Do you have blanks in your spreadsheet, hence your check for None?
Replace your blanks and None with x
@sandersbud4 @wakecarter Thank you both! This solution worked for me.