Running experiment with different movie durations

OS Windows10
PsychoPy version 2022.2.5
Working in Builder
What are you trying to achieve?: I am doing an experiment with different movies with different effectors (human and robot), the movie is the first part of the experiment and then there are images and an input from the subject, the videos are quite different in lenght (7 and 18 seconds)

What did you try to make it work?: I tried to put a parameter called “duration” in the loop excel and then referring duration to that parameter.

What specifically went wrong when you tried that?: Exit just after the video
That’s the message:

" File “D:\TESI\ExpTraining\training_lastrun.py”, line 553, in
movie.stop()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\movies_init_.py”, line 346, in stop
self._player.stop(log=log)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\movies\players\ffpyplayer_player.py”, line 831, in stop
raise RuntimeError(“Cannot close stream, not opened yet.”)
RuntimeError: Cannot close stream, not opened yet.
[ffpyplayer_abuffersink @ 00000231f559dd80] Removing channel layout 0x3, redundant with 2 channels
[ffpyplayer_abuffersink @ 00000231f8af8180] Removing channel layout 0x3, redundant with 2 channels
[ffpyplayer_abuffersink @ 00000231f9623240] Removing channel layout 0x3, redundant with 2 channels
[ffpyplayer_abuffersink @ 00000231f9623740] Removing channel layout 0x3, redundant with 2 channels"