Error running loop of videos in psychopy v2024.2.4

OS (e.g. Win10): Win 11
PsychoPy version (e.g. 1.84.x): 2024.2.4
Standard Standalone? (y/n) If not then what?: yes

I am trying to set a loop of 4 videos stimuli from an excel sheet to run randomly on psychopy and keep encountering this error

RuntimeError: Calling this class method requires a successful call to load first.
1.3977 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
################ Experiment ended with exit code 1 [pid:28104] #################

For this I already add a static element

But it still could not run and I don’t really understand what the error really is. (I’m a complete newbie in this)

How long are your videos? Maybe try a longer static period. See also.

Thank you for your response, I figured out the solution is to change playback > backend from ffpyplayer to vlc. But after this a new error showed up that was

UnboundLocalError: local variable ‘pracvideos’ referenced before assignment.

This is strange because no variables were dupely named so I don’t know why it showed this new error

for thisPracvid in pracvids:
currentLoop = pracvids
thisExp.timestampOnFlip(win, ‘thisRow.t’, format=globalClock.format)
if thisSession is not None:
# if running in a Session with a Liaison client, send data up to now
thisSession.sendExperimentData()
# abbreviate parameter names if possible (e.g. rgb = thisPracvid.rgb)
if thisPracvid != None:
for paramName in thisPracvid:
globals()[paramName] = thisPracvid[paramName]

    # --- Prepare to start Routine "prac_vids" ---
    # create an object to store info about Routine prac_vids
    prac_vids = data.Routine(
        name='prac_vids',
        components=[fix, preload, pracvideos],
    )
    prac_vids.status = NOT_STARTED
    continueRoutine = True
    # update component parameters for each repeat
    pracvideos = visual.VlcMovieStim(
        win=win, name='pracvideos', units='',
        filename=videos,
        ori=0.0, pos=(0, 0), opacity=None,
        loop=False, anchor='center',
        size=(0.5, 0.5),
        depth=-2.0,
        )
    # store start times for prac_vids
    prac_vids.tStartRefresh = win.getFutureFlipTime(clock=globalClock)
    prac_vids.tStart = globalClock.getTime(format='float')
    prac_vids.status = STARTED
    thisExp.addData('prac_vids.started', prac_vids.tStart)
    prac_vids.maxDuration = None
    # keep track of which components have finished
    prac_vidsComponents = prac_vids.components
    for thisComponent in prac_vids.components:
        thisComponent.tStart = None
        thisComponent.tStop = None
        thisComponent.tStartRefresh = None
        thisComponent.tStopRefresh = None
        if hasattr(thisComponent, 'status'):
            thisComponent.status = NOT_STARTED

Is there anything I could change in this code to fix this?