PsychoPy3 and Pavlovia issues: experiment will not run online

Hi everyone,

This is my gitlab with the code: https://gitlab.pavlovia.org/kathrinebredahl/the-implicit-association-test

I have made an experiment in PsychoPy3 and want to put it online, so people do not need to have PsychoPy to run the experiment. However, I cannot seem to make the connections right. I have made a project on gitlab and I think I have made the html, but not sure. When I run the experiment from Pavlovia, i.e. when I press “launch” (https://pavlovia.org/run/kathrinebredahl/the-implicit-association-test/html/)
the info box in green comes up, but after pressing OK, it just says “Thank you for your patience. The data have been saved.” and no data are (of course) saved.

Where do I mess it up?

Please let me know if more information is needed!

  • Kathrine

Hi @Kathrine_Korsgaard_B, the problem is that you have coded your entire experiment in a single code component. The code you have written is written in Python, and there are no JavaScript translations. For now, the Python to JavaScript translation is manual, so you will have to translate the code yourself. This is made easier in the code component with the use of the code type drop down box - you can select “Both” to see both Python and JS side by side, to aid translation.

To get your experiment working online, you will need to either translate all your code into JavaScript, or recreate your code using the Builder interface, with only custom code where you need extra flexibility. For example, use text components and loops with conditions files to display your task text. See Jons Stroop tutorial for an introduction to building experiments using Builder.

Thank you for your quick answer!
I have no experience with coding a JavaScript, so this might not be the best solution, at least for me. However, I have no experience in Builder either, only PsychoPy, so what would you suggest for me to proceed with, if any suggestions?

I would suggest taking a look at building the Stroop tutorial above, it does not take long. This will get you familiar with using Builder to create experiments. You can build many different kinds of experiments using only the Builder interface, for example take a look at the demos in the Demos menu. Builder has other advantages, for example, over time it is easier to remember how you created your experiment with its visual representation.

Once you are familiar with Builder (which will take long) begin building your experiment. If get stuck, just ask a question on here and we can help you solve your problem.