Unable to convert an object to its numerical form when running the study online (Pavlovia)

URL of experiment: https://gitlab.pavlovia.org/Yenju0115/bm_vr1
Hi,
I was trying to do run a script on line. In the experiment, the position of each presented stimuli was changed. Positions were defined in an .xlsx file and loaded through iteration (i.e. set every repeat).
The script was find when running on my laptop using Pychopy. But got errors when uploaded to Pavlovia.

Following is the error message:

  • when converting an object to it numerical form.
  • Unable to convert (90, 300) to a number.
    ps. (90, 300) was the one of the assigned position saved in a cell of the stored . xlsx file

I also tried to add a command line: R1_c1.setPos([t,0]) before in the original one: R1_c1.setPos(Staircase_R1). But they didn’t work. How can I made this work? Any suggestions will be greatly appreciated!

PsychoPy version is v2021.1.4 Mac OS 10.14.2.

Hey benben,

I’ve got two suggestions for you:

  • Variables in conditions become variables in the JS, so in your routine you could print the variables to the console to check whether they are as you expect. See Thomas Pronk / tutorial_js_console_log · GitLab
  • Perhaps this could work? In your conditions file, use separate variables for x and y position, and then in the position parameter of your stimulus write something like $[x, y]

Best Thomas