GitLab Id: #102667
Description of the problem:
I’ve created a auditive perceptual study in the Builder, and I’m having trouble in transfering to online: it’s stuck in “initializing experiment”…. I’m trying to go step by step – I’m very young, a baby! with codes –, and I read in Anastasia Sares’ quick-start guide that “the complete python code of your experiment can be generated and viewed with the “Compile to script” button”. I tried to do this in the builder, and I get this message:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\builder.py”, line 1185, in compileScript
if self.app.prefs.general[‘useRunner’]:
File “C:\Program Files\PsychoPy3\lib\site-packages\configobj.py”, line 554, in getitem
val = dict.getitem(self, key)
KeyError: ‘useRunner’
Can anyone help me?
Thank you in advanced for your time,
Gabriela
And if I open the developer view this is what I have:

Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. Autoplay Policy Changes | Web | Google Developers
s.default.Context @ Tone.min.js:1
Tone.min.js:1 * Tone.js v13.8.6 *
Tone.min.js:1 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. Autoplay Policy Changes | Web | Google Developers
s.default.Signal @ Tone.min.js:1
exp1_test9.js:266 Uncaught SyntaxError: Unexpected token ‘,’
Thank you,
Gabriela
Is your GitLab username a number? I believe that might cause issues.
I am unclear why you are compiling your Python to script and then showing an online error.
What is line 266 of the JS file exp1_test9.js (which you can find on GitLab)?
Hi, thank you so much for noticing me!
my user name in GitLab (and pavlovia.org) is gabrielatavares
the number I showed (GitLab Id: #102667) is the number that appears in GitLAb and pavlovia for my experience:

In line 266 I just have a coma:

I would send my experience psy and js file, but I don’t know how…
Hi,
I know that error.
Please edit your text component called pause_text so that it has a space instead of nothing as it’s contents.
Best wishes,
Wakefield
Thank you so much for your help!
Now there’s already something happening, but I get right away a message saying that it can’t download one of my images… I checked gitlab images folder and it’s there, in js file it appears in the same way as other images and no problems when running the exp. in builder. and when I changed the file name (in my folders and in builder) and run as pilot, I get the same message but for another image… what should I do?
G.

Hello,
this could be a simple spelling error. Check carefully lower- and uppercase of the directory and filename. Look for spaces in the filenames in your csv/xlsx-file.
Best wishes Jens
Dear Jens, thank you, I checked as you told me and yes, in the script was .jpg and in the file extention .JPG, so I change it in builder.
I could initiate the pilot, but when I arrived at the first trial I got this message:

I have know idea of the meaning - I’m really not familiar with code language.
Thank you for you help!
Gabriela
Are you using .setFlip in a code component? That doesn’t sounds like a function you should use in a Builder experiment.
Hi!
I had to add a code component in builder, for feedback answers, it works well when I run it in builder. It looks like this:


Begin Experiment:
msg=’’
Begin Routine:
if practice1_task1_mouse.isPressedIn(practice1_task1_box1) and correctAns==‘practice1_task1_box1’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box2) and correctAns==‘practice1_task1_box2’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box3) and correctAns==‘practice1_task1_box3’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box4) and correctAns==‘practice1_task1_box4’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box5) and correctAns==‘practice1_task1_box5’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box6) and correctAns==‘practice1_task1_box6’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box7) and correctAns==‘practice1_task1_box7’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box8) and correctAns==‘practice1_task1_box8’:
msg=“Helyes!”
answer_loop.finished = True
elif practice1_task1_mouse.isPressedIn(practice1_task1_box9) and correctAns==‘practice1_task1_box9’:
msg=“Helyes!”
answer_loop.finished = True
else:
msg=“Helytelen…”
What’s my mistake?
Thank you,
Gabriela
The error is related to the component practice1_task1_instructions_text
Please could you show that (and any code that mentions it)?
Hi!
In js file I have this:
// Initialize components for Routine “practice1_task1”
practice1_task1Clock = new util.Clock();
practice1_task1_instructions_text = new visual.TextStim({
win: psychoJS.window,
name: ‘practice1_task1_instructions_text’,
text: ‘default text’,
font: ‘Calibri’,
units: ‘norm’,
pos: [0, 0.8], height: 0.07, wrapWidth: undefined, ori: 1.0,
color: new util.Color(‘white’), opacity: 1.0,
depth: 0.0
});
And in builder it looks like this:
Thanks!
You have colour and text set to every repeat when they aren’t variables. I think they should be constant.
I see…
Just to be sure, because I will correct this in every component: the ‘set to every repeat option’ is only if I have repetitions of trials (nReps $)? or if I want the text to appear everytime the same image comes out (after each sound), within a trial?
Thank you!
p.s.
Is there a way to have consultations on this matters without taking your (or your colleagues) time for free? You do spend a lot of time helping…
I changed the settings of this (and other components) to constant, but now I have a new error… 
I think it has to do with constant/repeat settings, but I’ll try alone to understand where should I set to constant, and where shoud I set to repeat.
See you soon with some results, I hope!
What is your new error?
Constant means set during Begin Experiment
Each Repeat means set during Begin Routine
Each Frame means set during every frame (which I don’t recommend for online—it’s better to make frame changes in code components)
Hi, again 
I took out the feedback routine and loop, because the message was related to this, so I wanted to first check if the rest of the experiment works, which is simpler, I imagine.
By try and error I could set the parameters constant/repeat correctely.
But when I run the experiment (as pilot) the rating scale does not appear, and I don’t even find it in the js file! When I run in builder it works fine.
This is how it looks running in builder:


(the labels it’s a text component, and the color of the screen is the same as the color of the categories choice, that’s why we don’t see the numbers 1,2,3,4)
What can be the problem?
G.
Don’t know if it helps, but in the code view (through bulider not in gitlab) I have this:
practice2_task2_rating = visual.RatingScale(win=win, name=‘practice2_task2_rating’, marker=‘triangle’, size=0.8, pos=[0.0, -0.6], choices=[‘1’, ‘2’, ‘3’, ‘4’], tickHeight=0.0, singleClick=True, showAccept=False)
(but I have nothing like this in js in gitlab)
That’s because rating scales don’t work on Pavlovia
no!!!.. but maybe I can do it like the way I did with the images, I write the options in boxes, and have a mouse component.
What about the feedbacks, do they work?
Thank you for your patience,
G.