Experiment doesn't sync with pavlovia

Your error is in line

import {normal, randint, random, shuffle, uniform} from ‘numpy/random’;

Please take a look at my crib sheet for help with what works and doesn’t work online.

Hi,
Thanks for your answers.
Using thomas_pronk tutorial I have found indeed an error in the .js on line 130…(as pointed out by wakecarter).
I must say that this is unexpected to me since we adapted a script already running in Pavlovia. I have been checking other experiments and use these commands as well (from numpy.random import random, randint, normal, shuffle)…

No experiments running online will work importing numpy in the JavaScript.

Ok,
Help me find the error:

  1. I have my experiment coded with Builder (“expname.psyexp” file) and it runs well on my PC
  2. I upload the experiment to Pavlovia and the file generates the expname.py, expnamelastrun.py as well as the .js.
  3. It appears that the error is that the .js generated uses numpy f(x)s

Is this indicating that the problem is at the level of the code made with Builder?

Thanks once again for your help, really appreciate it

I feel like I’ve already found your error. You need to recode without importing Python libraries like numpy and random.

My crib sheet can help you or if you’d like me to sort it for you you could go to my ByMeACoffee site and buy a “Fix that Bug”

I found the same error when I use a .psyexp script that I download from Pavlovia (no modifications are added) to generate the .js.
For a reason that I do not get, my builder uses numpy to generate the .js…

I am happy to buy a “fix that bug” but I am not sure if this is something that you can fix

I have now solved the randomisation error by changing the code type directly in the builder:

Nevertheless, I find a new error with the function
import {time} from ‘time’;

I did not find how to overcome this on the Crib sheets:

Any other option?

Have you actually solved it or just delayed the error to the point you try to use the functions?

What are you using time for?

I’m happy to give you a refund if I fail.

Ok, let’s do it. I do not find you as “wakecarter”. Do you use another name?
For info:
What I need is to adapt the code in java script to be able to launch it in Pavlovia.
I thought that Psychobuilder was able to do that but it generates a .js using functions incompatible with Pavlovia.

My GitLab username is Wake. Please share the experiment with me and unprotect the master branch.

Please buy a “Fix that bug” from https://www.buymeacoffee.com/vespr/ and I’ll get your experiment working on Pavlovia. I can’t promise to fix everything but if it’s working offline and isn’t based around features that don’t work at all online then I should be able to get it most of the way.