Unknown resource error during loop (Pavlovia)

URL of experiment: Luke Ney / FT_followups · GitLab

Description of the problem: I have a tetris task that I am trying to run on Pavlovia. I have loaded the resources as suggested in other posts, and the program will begin until it begins the tetris playing loop. At this point (not at the start) I get the resource error as it cannot find my trials-data.xlsx conditions file. I am guessing that there must be a way to again load the required resource when the loop starts?

Thanks for any help!

Note that the task is not completed yet (though it all works offline including Tetris play), I am trying to test the transition to online before finalising smaller aspects of the project (such as font).

You need to delete your local html folder, remove html from Experiment Settings / Online, resync and then set your experiment to inactive then active again.

Hi there,
Thanks for your very quick response. I have done the suggested but still have the same error. Note that I was getting errors syncing so I uploaded a new project:

In this version I don’t have a html folder, or other folders that I had previously/

Thanks for any help,

Why is your loop defined as the following?
Try changing it to:

But it looks like you have another problem, which might be the real issue here.
You are importing functions from tetris.py. While it will work fine offline, you need to convert all the code to Javascript. Right now, you are only using Python code, for example:

import tetris
returnval = tetris.main(difficulty_level-1, runtime, thisExp, trials, port, channel, logging)

While this code is being translated to Javascript in PsychoPy, the actual code inside tetris.py won’t.
So it’s not possible to import Python scripts and libraries and expect PsychoJS to know somehow how to use them.

Good luck!