!need help asap asap!i

I keep getting a memory error 0X000000 whenever I run this experiment as is. If I take out the 3rd and 4th movie stim routines it’ll run perfectly, but for some reason having 4 seperate routines messes it up. It’s the same movie file in all 4 just with different segments (mind wandering probes are between them). I’m literally putting all the code for the whole experiment here, in hopes that someone can possibly spot the problem(s).

# ------Prepare to start Routine "VidStim1"-------
t = 0
VidStim1Clock.reset()  # clock
frameN = -1
continueRoutine = True
routineTimer.add(3.000000)
# update component parameters for each repeat
# keep track of which components have finished
VidStim1Components = [movieBoring1]
for thisComponent in VidStim1Components:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "VidStim1"-------
while continueRoutine and routineTimer.getTime() > 0:
    # get current time
    t = VidStim1Clock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *movieBoring1* updates
    if t >= 0.0 and movieBoring1.status == NOT_STARTED:
        # keep track of start time/frame for later
        movieBoring1.tStart = t  # not accounting for scr refresh
        movieBoring1.frameNStart = frameN  # exact frame index
        win.timeOnFlip(movieBoring1, 'tStartRefresh')  # time at next scr refresh
        movieBoring1.setAutoDraw(True)
    frameRemains = 0.0 + 3- win.monitorFramePeriod * 0.75  # most of one frame period left
    if movieBoring1.status == STARTED and t >= frameRemains:
        # keep track of stop time/frame for later
        movieBoring1.tStop = t  # not accounting for scr refresh
        movieBoring1.frameNStop = frameN  # exact frame index
        win.timeOnFlip(movieBoring1, 'tStopRefresh')  # time at next scr refresh
        movieBoring1.setAutoDraw(False)
    if movieBoring1.status == FINISHED:  # force-end the routine
        continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in VidStim1Components:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "VidStim1"-------
for thisComponent in VidStim1Components:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('movieBoring1.started', movieBoring1.tStartRefresh)
thisExp.addData('movieBoring1.stopped', movieBoring1.tStopRefresh)

# ------Prepare to start Routine "Probe1a"-------
t = 0
Probe1aClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe1a = keyboard.Keyboard()
# keep track of which components have finished
Probe1aComponents = [textProbe1a, key_respProbe1a]
for thisComponent in Probe1aComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "Probe1a"-------
while continueRoutine:
    # get current time
    t = Probe1aClock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *textProbe1a* updates
    if t >= 0.0 and textProbe1a.status == NOT_STARTED:
        # keep track of start time/frame for later
        textProbe1a.tStart = t  # not accounting for scr refresh
        textProbe1a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(textProbe1a, 'tStartRefresh')  # time at next scr refresh
        textProbe1a.setAutoDraw(True)
    
    # *key_respProbe1a* updates
    if t >= 0.0 and key_respProbe1a.status == NOT_STARTED:
        # keep track of start time/frame for later
        key_respProbe1a.tStart = t  # not accounting for scr refresh
        key_respProbe1a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(key_respProbe1a, 'tStartRefresh')  # time at next scr refresh
        key_respProbe1a.status = STARTED
        # keyboard checking is just starting
        win.callOnFlip(key_respProbe1a.clock.reset)  # t=0 on next screen flip
        key_respProbe1a.clearEvents(eventType='keyboard')
    if key_respProbe1a.status == STARTED:
        theseKeys = key_respProbe1a.getKeys(keyList=['y', 'n'], waitRelease=False)
        if len(theseKeys):
            theseKeys = theseKeys[0]  # at least one key was pressed
            
            # check for quit:
            if "escape" == theseKeys:
                endExpNow = True
            key_respProbe1a.keys = theseKeys.name  # just the last key pressed
            key_respProbe1a.rt = theseKeys.rt
            # a response ends the routine
            continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in Probe1aComponents:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "Probe1a"-------
for thisComponent in Probe1aComponents:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('textProbe1a.started', textProbe1a.tStartRefresh)
thisExp.addData('textProbe1a.stopped', textProbe1a.tStopRefresh)
# check responses
if key_respProbe1a.keys in ['', [], None]:  # No response was made
    key_respProbe1a.keys = None
thisExp.addData('key_respProbe1a.keys',key_respProbe1a.keys)
if key_respProbe1a.keys != None:  # we had a response
    thisExp.addData('key_respProbe1a.rt', key_respProbe1a.rt)
thisExp.addData('key_respProbe1a.started', key_respProbe1a.tStartRefresh)
thisExp.addData('key_respProbe1a.stopped', key_respProbe1a.tStopRefresh)
thisExp.nextEntry()
# the Routine "Probe1a" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()

# ------Prepare to start Routine "Probe1b"-------
t = 0
Probe1bClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe1b = keyboard.Keyboard()
# keep track of which components have finished
Probe1bComponents = [textProbe1b, key_respProbe1b, imageProbe1b]
for thisComponent in Probe1bComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "Probe1b"-------
while continueRoutine:
    # get current time
    t = Probe1bClock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *textProbe1b* updates
    if t >= 0.0 and textProbe1b.status == NOT_STARTED:
        # keep track of start time/frame for later
        textProbe1b.tStart = t  # not accounting for scr refresh
        textProbe1b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(textProbe1b, 'tStartRefresh')  # time at next scr refresh
        textProbe1b.setAutoDraw(True)
    
    # *key_respProbe1b* updates
    if t >= 0.0 and key_respProbe1b.status == NOT_STARTED:
        # keep track of start time/frame for later
        key_respProbe1b.tStart = t  # not accounting for scr refresh
        key_respProbe1b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(key_respProbe1b, 'tStartRefresh')  # time at next scr refresh
        key_respProbe1b.status = STARTED
        # keyboard checking is just starting
        win.callOnFlip(key_respProbe1b.clock.reset)  # t=0 on next screen flip
        key_respProbe1b.clearEvents(eventType='keyboard')
    if key_respProbe1b.status == STARTED:
        theseKeys = key_respProbe1b.getKeys(keyList=['1', '2', '3', '4', '5', '6'], waitRelease=False)
        if len(theseKeys):
            theseKeys = theseKeys[0]  # at least one key was pressed
            
            # check for quit:
            if "escape" == theseKeys:
                endExpNow = True
            key_respProbe1b.keys = theseKeys.name  # just the last key pressed
            key_respProbe1b.rt = theseKeys.rt
            # a response ends the routine
            continueRoutine = False
    
    # *imageProbe1b* updates
    if t >= 0.0 and imageProbe1b.status == NOT_STARTED:
        # keep track of start time/frame for later
        imageProbe1b.tStart = t  # not accounting for scr refresh
        imageProbe1b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(imageProbe1b, 'tStartRefresh')  # time at next scr refresh
        imageProbe1b.setAutoDraw(True)
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in Probe1bComponents:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "Probe1b"-------
for thisComponent in Probe1bComponents:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('textProbe1b.started', textProbe1b.tStartRefresh)
thisExp.addData('textProbe1b.stopped', textProbe1b.tStopRefresh)
# check responses
if key_respProbe1b.keys in ['', [], None]:  # No response was made
    key_respProbe1b.keys = None
thisExp.addData('key_respProbe1b.keys',key_respProbe1b.keys)
if key_respProbe1b.keys != None:  # we had a response
    thisExp.addData('key_respProbe1b.rt', key_respProbe1b.rt)
thisExp.addData('key_respProbe1b.started', key_respProbe1b.tStartRefresh)
thisExp.addData('key_respProbe1b.stopped', key_respProbe1b.tStopRefresh)
thisExp.nextEntry()
thisExp.addData('imageProbe1b.started', imageProbe1b.tStartRefresh)
thisExp.addData('imageProbe1b.stopped', imageProbe1b.tStopRefresh)
# the Routine "Probe1b" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()

# ------Prepare to start Routine "VidStim2"-------
t = 0
VidStim2Clock.reset()  # clock
frameN = -1
continueRoutine = True
routineTimer.add(6.000000)
# update component parameters for each repeat
# keep track of which components have finished
VidStim2Components = [movie2]
for thisComponent in VidStim2Components:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "VidStim2"-------
while continueRoutine and routineTimer.getTime() > 0:
    # get current time
    t = VidStim2Clock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *movie2* updates
    if t >= 3 and movie2.status == NOT_STARTED:
        # keep track of start time/frame for later
        movie2.tStart = t  # not accounting for scr refresh
        movie2.frameNStart = frameN  # exact frame index
        win.timeOnFlip(movie2, 'tStartRefresh')  # time at next scr refresh
        movie2.setAutoDraw(True)
    frameRemains = 6 - win.monitorFramePeriod * 0.75  # most of one frame period left
    if movie2.status == STARTED and t >= frameRemains:
        # keep track of stop time/frame for later
        movie2.tStop = t  # not accounting for scr refresh
        movie2.frameNStop = frameN  # exact frame index
        win.timeOnFlip(movie2, 'tStopRefresh')  # time at next scr refresh
        movie2.setAutoDraw(False)
    if movie2.status == FINISHED:  # force-end the routine
        continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in VidStim2Components:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "VidStim2"-------
for thisComponent in VidStim2Components:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('movie2.started', movie2.tStartRefresh)
thisExp.addData('movie2.stopped', movie2.tStopRefresh)

# ------Prepare to start Routine "Probe2a"-------
t = 0
Probe2aClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe2a = keyboard.Keyboard()
# keep track of which components have finished
Probe2aComponents = [textProbe2a, key_respProbe2a]
for thisComponent in Probe2aComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "Probe2a"-------
while continueRoutine:
    # get current time
    t = Probe2aClock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *textProbe2a* updates
    if t >= 0.0 and textProbe2a.status == NOT_STARTED:
        # keep track of start time/frame for later
        textProbe2a.tStart = t  # not accounting for scr refresh
        textProbe2a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(textProbe2a, 'tStartRefresh')  # time at next scr refresh
        textProbe2a.setAutoDraw(True)
    
    # *key_respProbe2a* updates
    if t >= 0.0 and key_respProbe2a.status == NOT_STARTED:
        # keep track of start time/frame for later
        key_respProbe2a.tStart = t  # not accounting for scr refresh
        key_respProbe2a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(key_respProbe2a, 'tStartRefresh')  # time at next scr refresh
        key_respProbe2a.status = STARTED
        # keyboard checking is just starting
        win.callOnFlip(key_respProbe2a.clock.reset)  # t=0 on next screen flip
        key_respProbe2a.clearEvents(eventType='keyboard')
    if key_respProbe2a.status == STARTED:
        theseKeys = key_respProbe2a.getKeys(keyList=['y', 'n'], waitRelease=False)
        if len(theseKeys):
            theseKeys = theseKeys[0]  # at least one key was pressed
            
            # check for quit:
            if "escape" == theseKeys:
                endExpNow = True
            key_respProbe2a.keys = theseKeys.name  # just the last key pressed
            key_respProbe2a.rt = theseKeys.rt
            # a response ends the routine
            continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in Probe2aComponents:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "Probe2a"-------
for thisComponent in Probe2aComponents:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('textProbe2a.started', textProbe2a.tStartRefresh)
thisExp.addData('textProbe2a.stopped', textProbe2a.tStopRefresh)
# check responses
if key_respProbe2a.keys in ['', [], None]:  # No response was made
    key_respProbe2a.keys = None
thisExp.addData('key_respProbe2a.keys',key_respProbe2a.keys)
if key_respProbe2a.keys != None:  # we had a response
    thisExp.addData('key_respProbe2a.rt', key_respProbe2a.rt)
thisExp.addData('key_respProbe2a.started', key_respProbe2a.tStartRefresh)
thisExp.addData('key_respProbe2a.stopped', key_respProbe2a.tStopRefresh)
thisExp.nextEntry()
# the Routine "Probe2a" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()

# ------Prepare to start Routine "Probe2b"-------
t = 0
Probe2bClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe2b = keyboard.Keyboard()
# keep track of which components have finished
Probe2bComponents = [textProbe2b, key_respProbe2b, imageProbe2b]
for thisComponent in Probe2bComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "Probe2b"-------
while continueRoutine:
    # get current time
    t = Probe2bClock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *textProbe2b* updates
    if t >= 0.0 and textProbe2b.status == NOT_STARTED:
        # keep track of start time/frame for later
        textProbe2b.tStart = t  # not accounting for scr refresh
        textProbe2b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(textProbe2b, 'tStartRefresh')  # time at next scr refresh
        textProbe2b.setAutoDraw(True)
    
    # *key_respProbe2b* updates
    if t >= 0.0 and key_respProbe2b.status == NOT_STARTED:
        # keep track of start time/frame for later
        key_respProbe2b.tStart = t  # not accounting for scr refresh
        key_respProbe2b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(key_respProbe2b, 'tStartRefresh')  # time at next scr refresh
        key_respProbe2b.status = STARTED
        # keyboard checking is just starting
        win.callOnFlip(key_respProbe2b.clock.reset)  # t=0 on next screen flip
        key_respProbe2b.clearEvents(eventType='keyboard')
    if key_respProbe2b.status == STARTED:
        theseKeys = key_respProbe2b.getKeys(keyList=['1', '2', '3', '4', '5', '6'], waitRelease=False)
        if len(theseKeys):
            theseKeys = theseKeys[0]  # at least one key was pressed
            
            # check for quit:
            if "escape" == theseKeys:
                endExpNow = True
            key_respProbe2b.keys = theseKeys.name  # just the last key pressed
            key_respProbe2b.rt = theseKeys.rt
            # a response ends the routine
            continueRoutine = False
    
    # *imageProbe2b* updates
    if t >= 0.0 and imageProbe2b.status == NOT_STARTED:
        # keep track of start time/frame for later
        imageProbe2b.tStart = t  # not accounting for scr refresh
        imageProbe2b.frameNStart = frameN  # exact frame index
        win.timeOnFlip(imageProbe2b, 'tStartRefresh')  # time at next scr refresh
        imageProbe2b.setAutoDraw(True)
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in Probe2bComponents:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "Probe2b"-------
for thisComponent in Probe2bComponents:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('textProbe2b.started', textProbe2b.tStartRefresh)
thisExp.addData('textProbe2b.stopped', textProbe2b.tStopRefresh)
# check responses
if key_respProbe2b.keys in ['', [], None]:  # No response was made
    key_respProbe2b.keys = None
thisExp.addData('key_respProbe2b.keys',key_respProbe2b.keys)
if key_respProbe2b.keys != None:  # we had a response
    thisExp.addData('key_respProbe2b.rt', key_respProbe2b.rt)
thisExp.addData('key_respProbe2b.started', key_respProbe2b.tStartRefresh)
thisExp.addData('key_respProbe2b.stopped', key_respProbe2b.tStopRefresh)
thisExp.nextEntry()
thisExp.addData('imageProbe2b.started', imageProbe2b.tStartRefresh)
thisExp.addData('imageProbe2b.stopped', imageProbe2b.tStopRefresh)
# the Routine "Probe2b" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()

# ------Prepare to start Routine "VidStim3"-------
t = 0
VidStim3Clock.reset()  # clock
frameN = -1
continueRoutine = True
routineTimer.add(9.000000)
# update component parameters for each repeat
# keep track of which components have finished
VidStim3Components = [movie3]
for thisComponent in VidStim3Components:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "VidStim3"-------
while continueRoutine and routineTimer.getTime() > 0:
    # get current time
    t = VidStim3Clock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *movie3* updates
    if t >= 6 and movie3.status == NOT_STARTED:
        # keep track of start time/frame for later
        movie3.tStart = t  # not accounting for scr refresh
        movie3.frameNStart = frameN  # exact frame index
        win.timeOnFlip(movie3, 'tStartRefresh')  # time at next scr refresh
        movie3.setAutoDraw(True)
    frameRemains = 9 - win.monitorFramePeriod * 0.75  # most of one frame period left
    if movie3.status == STARTED and t >= frameRemains:
        # keep track of stop time/frame for later
        movie3.tStop = t  # not accounting for scr refresh
        movie3.frameNStop = frameN  # exact frame index
        win.timeOnFlip(movie3, 'tStopRefresh')  # time at next scr refresh
        movie3.setAutoDraw(False)
    if movie3.status == FINISHED:  # force-end the routine
        continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in VidStim3Components:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "VidStim3"-------
for thisComponent in VidStim3Components:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('movie3.started', movie3.tStartRefresh)
thisExp.addData('movie3.stopped', movie3.tStopRefresh)

# ------Prepare to start Routine "Probe3a"-------
t = 0
Probe3aClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe3a = keyboard.Keyboard()
# keep track of which components have finished
Probe3aComponents = [textProbe3a, key_respProbe3a]
for thisComponent in Probe3aComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED

# -------Start Routine "Probe3a"-------
while continueRoutine:
    # get current time
    t = Probe3aClock.getTime()
    frameN = frameN + 1  # number of completed frames (so 0 is the first frame)
    # update/draw components on each frame
    
    # *textProbe3a* updates
    if t >= 0.0 and textProbe3a.status == NOT_STARTED:
        # keep track of start time/frame for later
        textProbe3a.tStart = t  # not accounting for scr refresh
        textProbe3a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(textProbe3a, 'tStartRefresh')  # time at next scr refresh
        textProbe3a.setAutoDraw(True)
    
    # *key_respProbe3a* updates
    if t >= 0.0 and key_respProbe3a.status == NOT_STARTED:
        # keep track of start time/frame for later
        key_respProbe3a.tStart = t  # not accounting for scr refresh
        key_respProbe3a.frameNStart = frameN  # exact frame index
        win.timeOnFlip(key_respProbe3a, 'tStartRefresh')  # time at next scr refresh
        key_respProbe3a.status = STARTED
        # keyboard checking is just starting
        win.callOnFlip(key_respProbe3a.clock.reset)  # t=0 on next screen flip
        key_respProbe3a.clearEvents(eventType='keyboard')
    if key_respProbe3a.status == STARTED:
        theseKeys = key_respProbe3a.getKeys(keyList=['y', 'n'], waitRelease=False)
        if len(theseKeys):
            theseKeys = theseKeys[0]  # at least one key was pressed
            
            # check for quit:
            if "escape" == theseKeys:
                endExpNow = True
            key_respProbe3a.keys = theseKeys.name  # just the last key pressed
            key_respProbe3a.rt = theseKeys.rt
            # a response ends the routine
            continueRoutine = False
    
    # check for quit (typically the Esc key)
    if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]):
        core.quit()
    
    # check if all components have finished
    if not continueRoutine:  # a component has requested a forced-end of Routine
        break
    continueRoutine = False  # will revert to True if at least one component still running
    for thisComponent in Probe3aComponents:
        if hasattr(thisComponent, "status") and thisComponent.status != FINISHED:
            continueRoutine = True
            break  # at least one component has not yet finished
    
    # refresh the screen
    if continueRoutine:  # don't flip if this routine is over or we'll get a blank screen
        win.flip()

# -------Ending Routine "Probe3a"-------
for thisComponent in Probe3aComponents:
    if hasattr(thisComponent, "setAutoDraw"):
        thisComponent.setAutoDraw(False)
thisExp.addData('textProbe3a.started', textProbe3a.tStartRefresh)
thisExp.addData('textProbe3a.stopped', textProbe3a.tStopRefresh)
# check responses
if key_respProbe3a.keys in ['', [], None]:  # No response was made
    key_respProbe3a.keys = None
thisExp.addData('key_respProbe3a.keys',key_respProbe3a.keys)
if key_respProbe3a.keys != None:  # we had a response
    thisExp.addData('key_respProbe3a.rt', key_respProbe3a.rt)
thisExp.addData('key_respProbe3a.started', key_respProbe3a.tStartRefresh)
thisExp.addData('key_respProbe3a.stopped', key_respProbe3a.tStopRefresh)
thisExp.nextEntry()
# the Routine "Probe3a" was not non-slip safe, so reset the non-slip timer
routineTimer.reset()

# ------Prepare to start Routine "Probe3b"-------
t = 0
Probe3bClock.reset()  # clock
frameN = -1
continueRoutine = True
# update component parameters for each repeat
key_respProbe3b = keyboard.Keyboard()
# keep track of which components have finished
Probe3bComponents = [textProbe3b, key_respProbe3b, imageProbe3b]
for thisComponent in Probe3bComponents:
    thisComponent.tStart = None
    thisComponent.tStop = None
    thisComponent.tStartRefresh = None
    thisComponent.tStopRefresh = None
    if hasattr(thisComponent, 'status'):
        thisComponent.status = NOT_STARTED