psychopy.org | Reference | Downloads | Github

Experiment won't continue to next routine

OS: Ubuntu 16.4
PsychoPy version: 1.85.3
Standard Standalone? (y/n) If not then what?: Should have all dependencies installed?

DESCRIPTION OF EXPERIMENT HERE: Give visual feedback based on response without ending trial - #5 by emsti

Had my experiment running perfectly (see above), the only thing I changed was removing the time limit from my sound files (which was set for testing purposes). When I try to make psychopy play the full sound files (several minutes long), the experiment won’t move on to the next routine (a pause (“paussi”) before playing the next sound file in the loop). Here’s a screencap of the builder where the experiment doesn’t work:

You haven’t specified an end point to the stimulus, so the routine will continue indefinitely. PsychoPy can’t assume that the end of a sound stimulus means the routine should end (because you might have other stimuli that should continue after that.

So you need to explicitly give an end point to the stimulus. Try something like this in the Stop/duration field:

$sound_1.duration

Hi, unfortunately this doesn’t work. Psychopy gives the error "Python var ‘sound_1’ in ‘Stop’ is same as Name’. Tried with “arsykeklipit” instead of “sound_1” and “.getDuration()” instead of “.duration” but those didn’t work either.

I take it back, I think Builder is now supposed to end a trial when a sound ends, if there are no other longer-duration stimuli present, so I’m not sure why your original set-up (of leaving the duration field empty) doesn’t work.

  • Do you have anything in the code component that might be preventing the routine from ending?
  • What about adding this in your code component’s “every frame” tab:
if t >= sound_1.duration:
    continueRoutine = False