Random sound files in loop won't play

OS (e.g. Win10): macOS Sonoma / Win10
PsychoPy version (e.g. 1.84.x): 2023.2.2
Standard Standalone? (y/n) y
What are you trying to achieve?: Play 48 sounds (each 1000ms, same sampling rate) at random in a loop via conditions.xlsx, end each condition per key response

What did you try to make it work?:
I used the builder. Everything works fine, every condition sets in.

Sound properties in the routine:

Loop properties:

What specifically went wrong when you tried that?:

Every time I do a test run, some of the sounds in the conditions won’t play. Data says, these sounds did just not start (time stamp). Sometimes it’s 2 out of all, the other time it’s 6, but (and that’s the thing that makes me say it’s not bc of the files) every time the sounds that won’t play are different ones than before. There’s no error messages whatsoever, the py-script runs just fine.

I’ve tried basically all that was suggested in other threads (audio library, play random/sequential, different PsychoPy Versions from 2023, split the conditions in half, 3 parts, 4 parts, tried .mp3 and .flac instead of .wav), still nothing helps. If I put the sounds in single routines, it works. Loop bugged?

Gladly appreciate all the help I can get!

I have a similar issue with my PsychoPy script. Some audio files in a loop simply don’t play. The error message says that ‘sound reached end of file’. I tried all other fixes I could find on the forum (switching between PTB, pyo, sounddevice) and nothing seems to work. The error doesn’t break the script - some images are just no accompanied by the appropriate audio. Any advice you may be able to offer would be super helpful. Thanks!