Transfering JavaScript experiment to online PsychoPy

I’m interested in adding abbreviated 9-item Raven’s standard progressive matrice to m0y experiment. Unfortunately, I couldn’t find any versions of it in Pavlovia, (not compatible) so this is what I’ve found: jspsych-demos/tasks/rpm at main · nivlab/jspsych-demos · GitHub So, can I use this JavaScript experiment in my online PsychoPy experiment? How can I directly transfer this experiment to PsychoPy

jsPsych is a different JavaScript library than what PsychoPy uses (which is PsychoJS), so there’s no way to incorporate it directly into a PsychoPy study. You can host a jsPsych study on pavlovia, but you can’t mix it into a PsychoPy experiment.

However, someone has already made at least one version of Raven’s matrices in PsychoPy, and you can clone it from here: Jordan Fuller / Ravens Progressive Matrices · GitLab

See clone and fork instructions here: Pavlovia

There is no “image1”, there is only a component named “image”. If you put “image.pos” instead, it should work.

You’ll probably run into the same error with “image2” because the name of the component is “image_2”, and the underscore does matter.

Basically the names of the components need to match the names of the images in the code.

It’s not listed under “clickable stimuli” in mouse_7. That’s the only thing I can think of.

Based on this earlier thread I think it’s an issue with the “clickable stimuli” list: TypeError: obj.contains is not a function when using variable clickable stimuli - #11 by darsyq

However, you actually don’t need that list at all with your current code because you’re checking each image manually anyway, so the fastest solution may be to simply clear the “clickable objects” field for mouse_7 and try running it again.

Make sure that all of the properties of the images are set to update every frame, but I’m not sure why it would fail that way in particular, there’s nothing in your code that should make it do that.

That’s an issue with the code component - you have javascript in the Python box. If you’re only running it online, just get rid of the code in the Python box (just make sure it’s not on Auto->JS)