Video fails to open when using loop function

I am new to PsychoPy and have managed to build an experiment of one trial which runs properly (i.e., display instructions, call the video file and play video, display a still image, initiate keyboard response). There are no issues opening the video file.

Now, I want to use the loop function to display 6 different videos. When inserting the loop I have uploaded an csv. file which correctly identifies the 2 parameters (first_video, video_num). All 6 videos and corresponding still images have the correct file names (as I copy & pasted them). In stimulus properties for the movie stimuli, I have changed Movie file from the file name ‘Dyn_orig_T_Fam’ to ‘$first_video’ and selected ‘set every repeat’.

However, I am receiving the error:

File “C:\Users\LabUser\lib\site-packages\psychopy\visual\movies_init_.py”, line 216, in loadMovie raise FileNotFoundError(“Cannot open movie file {}”.format(
FileNotFoundError: Cannot open movie file Dyn_orig_T_Fam

I don’t understand the error as the video file is in the same location as it was before, and system knows which file it is looking for but is failing to open it.

Can anyone help me please? Thanks.

Hello

what operating system does your computer run?

is missing a file-extension. It might be hidden if you are on a windows machine.

Best wishes Jens

1 Like

Hi Jens,

You’re right - I needed to add ‘.avi’ at the end of my file names on the csv. file. It is working now, thanks for your help :slight_smile:

Aimee

1 Like