I have an experiment with multiple loops, and my last loop works fine in PsychoPy but does not function correctly in Pavlovia. The first image appears correctly, but after that, the screen goes blank for the rest of the trials. All my other loops work fine and are similarly structured, so I don’t understand why this one fails.
Oddly, when I implement a skip debug to move through my loops, (keys = event.getKeys()
if ‘s’ in keys:
test_trials.finished = True), the final loop works perfectly…
So, when I manually go through the entire task, the last loop only shows the first trial and then goes blank. When I skip through trials, my last loop works as it should.
I’ve checked that:
Images are correctly referenced in my conditions file and display fine in PsychoPy.
The routine has no fixed stop time, and responses should advance the trial.
Debugging logs show that trials are still running in the background, but no new images appear on Pavlovia.
Here are some additional details about the experiment:
Flow of the Experiment:
Practice Identification Test Loop
Identification Test Loop
Recognition Test Practice Loop
Recognition Test Loop (Final loop, where the issue occurs)
In the Identification Loops, participants categorize images as animate or inanimate by pressing ‘J’ or ‘K’
In the Recognition Test, participants decide whether images are old or new by pressing ‘O’ or ‘N’
Attention probes appear at fixed intervals (every 111th image in the Identification Test Loop and every 141st image in the Recognition Test Loop).
Problem:
My final loop (Recognition Test Loop) only displays the first trial (out of 423), then the screen goes blank after the first image is shown and a key press is made. The experiment never progresses to the second trial.
What I’ve Observed:
When I skip through the earlier loops using debug code, the Recognition Test Loop works perfectly.
When I go through the experiment normally as a participant would (without skipping), the Recognition Test Loop goes blank after the first trial.
-The Identification Test Loop and the Recognition Test Loop use very similar code, so I’m unsure why only the Recognition Test Loop is failing.
Additional Notes
-Each image is displayed for **1.5 seconds (90 frames)
-Participants make a key press to advance to the next trial
I’ve attached screenshots of the code I’ve been using.
Any insights into why the Recognition Test Loop fails unless I skip through the earlier loops would be greatly appreciated. Thanks in advance for your help!