URL of experiment: https://run.pavlovia.org/t_s/24drb_erw/html
Description of the problem: Pavlovia is stuck on the “intializing experiment” screen.
I have read on other forum posts that one reason could be the python to js conversion, and I think this might be my problem.
I have built the experiment with the PsychoPy Builder, and have a few custom code elements in it.
The code element that I think might be causing the problem is one I used to set the interval between the fixation cross and the first stimulus (the other code elements have been used before). I tried this out in the offline version of the experiment, and it works as I want it to. Basically, it uses numpy’s random.exponential function to set the interval between two stimuli. If the interval that is drawn is too long then it is rejected with a if statement.
Below is the python code I am using in the Begin Routine tab:
from numpy import random sc = 0.2 maxi = sc * 12.5 #generate number isi = random.exponential(scale = 0.2, size = None) #if isi is larger than maxi, keep drawing until it is smaller while isi > maxi: #print("larger") isi = random.exponential(scale = 0.2, size = None) thisExp.addData("isi", isi)
In the Begin Experiment tab I have:
isi = 0
In the Duration field of the respective Routine, I use “$isi” to set the duration.
Any help would be appreciated.