URL of experiment: https://pavlovia.org/run/djwyen/language-learning/html/
Description of the problem:
Hello all,
We are working on a project in PsychoPy. Our project extensively uses python code, but all of it is in code components of routines in the builder (ie the experiment is fully created in PsychoPy’s builder). It runs perfectly fine in the desktop version, but errors crop up in the Pavlovia version. We get the error “ReferenceError: Can’t find variable: selection_example”
With the way our experiment is set up, there is a code component in a routine at the beginning of the experiment which uses pandas to import data from an excel file to a DataFrame. We access data in the DataFrame to create a string called ‘selection_example’ which we pass to the ‘Selected rows’ parameter of a loop in our experiment.
Since the routine that defines ‘selection_example’ chronologically precedes the loop in our experiment’s flow, shouldn’t the variable ‘selection_example’ be defined by the time PsychoPy reaches the loop that uses it? It seems that something changes during the process of the upload from Python to JavaScript — does anyone know how we can address this?
Thanks!