Movie clip doesn't work

I’ve just started my adventure with PsychoPy so I may have overlooked something really obvious.The problem is that when I add a clip, I can’t run the experiment. With text stimulus everything works perfectly, when I add a picture or a movie, I just see a grey screen for a second and the experiment is over. Could you help me fix the problem?

I get exactly this error:

 OSError: Movie file '"C:\Users\Karolina Baranowska\Desktop\Experimenting\klip avi.avi"' was not found
Exception ignored in: <bound method MovieStim3.__del__ of <psychopy.visual.movie3.MovieStim3 object at 0x0000029FC4B0B8D0>>
OSError: exception: access violation reading 0x0000000000000000

The error is fortunately easy to address: the movie file is not where you are telling PsychoPy it is.

The biggest problem here is likely the use of an absolute path: because they are so long, they are easy to get wrong, and using the Windows backslash can cause problems. So:

  1. Use / separators instead of \.
  2. Use relative paths instead of absolute paths.

A relative path doesn’t start with c:/. Instead it is relative to the location of your .psyexp Builder file. So if the movie is in the same folder, just refer to it by name, i.e. klip avi.avi. If it is in a sub-folder of that folder (called, say, videos), then you could refer to it like this: videos/klip avi.avi (note the forward slash). Relative paths also have the advantage that you can move the experiment files to another folder, or even another computer, and the experiment will still work.

Lastly, Windows can hide the file extensions from you. So a file that looks like it is called klip avi.avi could actually be klip avi.avi.avi unless you have Windows set to show all file extensions.

1 Like

Dear Michael

I’m so grateful for your prompt reply. The problem was, as I expected, trivial but without your help, I wouldn’t be able to fix it. Now everything works! Thank you so much, you literally saved my PhD project!