Hi all. Bit of an issue… After much pain and aguish I have put together a pilot/working version of an attentional blink paradigm, which works as I want it in the ‘offline’ builder mode… But when I run it as a pilot on Pavlovia… it is doing something else.
I think the nature of the issue lies in the use of code components. I have had to use quite a few in order to get the experiment to work in builder, and namely this means terminating some of the loops early in order to satisfy some of the experiment conditions. It seems, at least from my untrained eye, that these are being ignored on the Pavlovia version.
Am I doing something incredibly silly somewhere? Or is this an ongoing issue?
Please show what you have actually done (i.e. show us your actual code snippets), and give other information (e.g. the version of PsychoPy you are using- relevant as some online loop issues have been addressed recently: Cannot exit loop in online Pavlovia (Using JS code component)).
Thank you for getting in touch so quick. In essence, what I have managed to do in the builder mode, is from a list of 60 ‘filler’ words, to select 10 of those randomly, present them in succession. I have done this by terminating the loop early after the first ten randomly sailed words are chosen from the list as such:
I have ended some of the loops early my using in Begin Routine:
The reason seems to be that this code is still in Python. Python doesn’t (generally) run online. So Builder generates the experiment for you in Javascript when running online. But you are responsible for providing Javascript equivalents of any custom Python code you have inserted.
In your code components, note that there is now a “code type” button. This can be “Python”, “JS”, “Both” or “Auto → JS”. You will want one of the last two. It is worth downloading the very latest version of PsychoPy from here, as it does now at least attempt to do some auto-translation for you if you choose that “Auto → JS” option.
e.g. I’m not a Javascript person, but you Python code above looks like this when auto-translated:
Ok, so after a bit of investigation… I think the first loop is working, i.e. it terminates correctly after 10 presentations of different (randomly selected) words.
Could this be a problem with the (first) loop finishing and then jumping out and ignoring the other loops I guess? Sorry if that is worded in a strange way.