Raise RuntimeError(“Cannot close stream, not opened yet.”)

I found a solution in my experiment (thanks to some help from colleagues)! I had to change the duration of the videos in the Excel sheet to be a little longer than the actual video duration. I added two seconds, but you can probably play around with it in your experiment. We think this is necessary because the video takes some time to buffer and so you need to include that in your duration time. Hopefully this helps!