URL of experiment: Nicolas Goulet / online_version · GitLab
Description of the problem: I want to use PsychoJS Rect from Visual but get Referrence Error Rect not defined.
TLDR : Where do I need to put the PyschoJS Rect from Visual import in PsychoPy builder for it to work when starting the experiment from Pavlovia and not get Reference Error Rect not defined?
To be used in PsychoJS, it has to be imported. When I try to run the experiment online, it says to me that Rect is not defined/not imported.
I know we cannot do imports from the 2023 crib sheet but as Rect is from psychojs, I assume there is a way to use it in my experiment and I am pretty sure I am just being a novice and this is a pretty simple problem to fix. But I have spent hours scouring the web and the different crib sheets without being able to find an answer.
I have wrtitten custom code blocks for showing Rect shapes of certain size and color. The Psychopy/local version of the experiment works just fine. I tried putting the PsychoJS VIsual Rect import statement in the ‘‘before the experiment’’ section but still get the same message :
Reference Error : Rect is not defined
Really thankful for any help! I am so close to finally start collecting data for both the online and eeg version of this experiment
I know I could try to modify the PsychoJS code itself and add the import statement BUT if I understood the Crib Sheets/good practices of PsychoPy correctly, it is very strongly advised not to modify the PyschoJS script directly in Coder.