Error message: online, when I reach the routine that has 2 buttons defined, they don’t show up on the screen, and when I click anywhere, I receive the error message:
Reference error: buttonYES not defined.
The experiment is a save as of a previous experiment. Everything is working well locally using Python. These experiments were built using PsychoPy v2021.1.3. The base experiment was working flawlessly both offline and online.
In the previous experiment, this error did not occur at all.
Only change I did was:
Install PsychoPy v2023.1.3 to see if other things for a different experiment have changed. I observed that no other things have changed.
Uninstall PsychoPy v2023.1.3 and re-install v2021.1.3. Save As the experiment again and re-sync it online.
I get this error after these changes in versions.
Now I have V2021.1.3 and have uninstalled the previous one. I have un-installed it before reinstalling v2021.1.3
Any suggestions on how to tackle this?
I checked the code in between both experiments and nothing is different for the buttons sections at least, so it should not appear.
Hello,
Looking at your JS code, it doesn’t look like the buttons are being declared.
When I need to work online with buttons, I use a polygon and text over it. As much as I know, buttons are not yet supported online: https://www.psychopy.org/online/status.html
I am unsure if it was updated, but it might be the issue.
Hey,
I quoted a message from @wakecarter from April 2022.
It’s possible buttons now work online, I didn’t test it myself, and I didn’t find any newer information about it.
But the thing that is wrong with your experiment is the fact that your buttons are not being declared at all in the JS file.
Hello,
Did you try placing this code component in the routine hierarchy after your buttons?
It’s difficult to understand the whole picture, the project you have sent is 600MB+ and has multiple experiments.
If you want to make it possible to help, please separate it into a single, simple project.
I also tried placing them after the buttons ,but that still doesnt work. But given that they’re declared after the point when they’re being used… it would make sense.
It looks to be declared just fine.
Do you have a separate version of the study on Pavlovia? One that doesn’t have multiple experiments on it?
That way, it will be easy to take a look myself.
In the above routine, the images and polygons are not active, they are disabled, only the buttons are active (and all other elements that require the buttons).