Script error on my pavlovia experiment on tablet

Hello,

I am trying to develop an image recognition experiment on Pavlovia. The final goal of this experiment is for it to be performed on tablets by participants, who will be children. My current prototype works on a computer, but when I try to run it on an iPad, I get the following error:

The experiment works as follows: participants are presented with four images and a sound describing which image they need to click on. They must then select the correct image. Here is an example of one of the tasks:

How can I make my experiment run on a tablet when everything works fine on a computer? I saw a similar error on some topics, but it was related to forms, and I didn’t understand the answer (rating type question and dropdown question).

Thank you in advance!

The unknown component niveau2_2 suggests that you have an experiment created in 2024.x which you have then opened in an earlier version.

What version of PsychoPy are you using?

Thanks for your answer.

The unknown component is something that was created when I pushed my experiment to Pavlovia. I haven’t changed my version of PsychoPy since I created this experiment.

I used version 2024.2.4. Do I need to upgrade it?

Hello

You are running the experiment in a browser. What version does Pavlovia recognize, see example?

grafik

Do you need the component niveau2_2?

Best wishes Jens

I think this could only have happened if you had a pre Routine Settings version set in Experiment Settings.

I run it on this version
Capture d’écran 2025-03-04 à 10.57.30

Nothing change when I remove it

What’s a pre routine settings ?

I mean a version of PsychoPy that comes from before Routine Settings.

Since your platform version is 2024.2.4 then probably what happened is that you edited a recent psyexp file with an older PsychoPy and later opened it in the recent version.

1 Like

Ok, I understand thank for the explanation :slight_smile: . I removed it, and now my experiment works on my tablet except for the mouse component. Do you know how I can fix this?

Hello @Magicdjez

How do you use the mouse-component? What does not work?

Best wishes Jens

This is a picture of the component options. The goal is to click on one of the four images. On my tablet, the click doesn’t work, and nothing happens. I saw in some previous topics that sometimes you need to click twice or press harder, but that doesn’t work in my case.

Thank you for your help,
Djeser

Does this mouse component work as expected on a computer?

The tablet you are using may not be recording clicks correctly. If that is the case, then you could instead have the following code:

Begin Routine

mouseRec = mouse1.getPos()
response = 0

Each Frame

mouseLoc = mouse1.getPos()
if t < .05:
     pass
elif mouseLoc[0] != mouseRec[0] or mouseLoc[1] != mouseRec[1]:
     mouseRec = mouseLoc
     if img1.contains(mouse1):
          response = 1
          continueRoutine = False
     elif img2.contains(mouse1):
          response = 2
          continueRoutine = False
     elif img3.contains(mouse1):
          response = 3
          continueRoutine = False
     elif img4.contains(mouse1):
          response = 4
          continueRoutine = False
1 Like

It works, thanks a lot! It was a big issue for my project!

However, I get an error at the end. The entire experiment works fine, but I receive this message.

Do you have any End Experiment code, or End Routine of the final routine, or a redirect?

Nope do I need to have one ?

No. I am looking for reasons for the error. You were using pilot mode, weren’t you? Try running mode. It might be that there’s an issue with piloting when it tries to download the pilot data.

Ok i will try but I download a css file at the end of the experiment

it works on running mode

1 Like