Psychopy to pavlovia (Math library and shuffle)

I am new to psychopy & pavlovia so I’m not sure I even know how/where to start with troubleshooting! Please help!! Any direction is appreciated. Thanks!

Description of the problem: I have been trying to run my experiment on Pavlovia. From looking at the python to javascript crib sheet, I have added the following lines: pi=Math.PI, shuffle=util.shuffle, etc to my custom builder code area

but now I have the errors, saying that ‘Math’ or ‘util’ is not defined. What can I do to fi this?

Hi There,

Firstly - Welcome to psychopy and pavlovia!

Secondly, when it comes to debugging online experiments the most helpful things can be done to allow the community to offer help are

  1. make the repository for your project public (from your experiment page go>view code>settings> permissions>visibility) and share the URL with us (from your experiment page select “view code” and send us the URL to that page) - of course it is understandable that not everyone can make their repo public, in those cases share the exact code snippets you have used and tell us where you implemented them (e.g. the “Begin experiment” tab)
  2. share the exact error messages with us (as you pretty much have)

As a first check - did you deffinately add those snippets to the JS side of your code component? (the right side if you have “codeType” set “auto->JS” or if you only want a JS component set codeType to JS.

Thanks,
Becca