Blank feedback screen on Pavlovia

URL of experiment: Sign in · GitLab

Description of the problem:
Hi,

I am attempting to give feedback after a trial on a timing task in PsychoPy. In the experiment participants have to identify whether upper eyelids are symmetric (up arrow) or asymmetric (down arrow). I have a trial section where they can practice on 5 images and receive feedback.

The feedback message was based on this tutorial. It works in PsychoPy but when I attempt to run it on Pavlovia the screen where the feedback text should display is blank.

I have looked through forums and my text field is set to “set every repeat” and my code component is above my text component.

Below are images of my begin routine and begin experiment code in builder.


I feel like this is something easy to fix but I have not been able to figure it out (new to both Pavlovia and coding).

Thank you in advance for your help.

Looks like you’re setting the variable to an empty string at the start of the experiment and have only got python code to update that. You might need to convert the begin routine block into javascript

Hi Oli,

Thank you so much for your help.

The auto translation from Py → JS threw a syntax error so I wrote my own bit of code as you can see here.

Now when I run the experiment on Pavlovia the incorrect message shows up however instead of the correct message all I get is “NaN” (below). I think it might have to do with " %(trial_resp.rt)" in my begin routine code but I am not sure.

Thanks,
John

Ahh - formatted strings are different in JS - can’t remember how to do them off the top of my head - it might be something like “”.format() - try googling that, switch from Py->JS to Both and replace the code with the new formatted string

I was able to write some code using an embedded expression (below). Note I included the “.toFixed(3)” in order to set the number of decimals displayed.

Hopefully this helps anyone else who is having trouble reporting reaction time on Pavlovia.

2 Likes

hi so sorry for disturbing. I have encountered the same issues, but when I change the code to .toFixed(3). The online experiment stuck on the initializing the experiment page. May I know what is the problem. and I searched for why it stuck on that page, someone suggested that it may be the JS script problem. May I know how can I solve this issues?