Ange
August 4, 2022, 6:51pm
1
Hello,
This is my overall task:
In this task, people see a movie for a randomly varied time before responding to a visual analog scale (VAS).
Details of the task and how it is coded are here:
Breakdown after stimulus random stop - #10 by Ange . Or right away here the psychopy task:
EmpathySTUDY.zip (77.7 KB)
One movie stimuli example is here:
e.mp4 - Google Drive
What specifically went wrong ?:
After the movie, the experiment breaks down with the error
raise RuntimeError(“Cannot close stream, not opened yet.”)
Online I don’t find much about this error… In the VAS routine, I added the following code in the Start section, but it does not help…
Happy for any suggestions… Thanks a lot in advance
cpat3
August 16, 2022, 8:55pm
2
Was a solution ever found to this? I am having the exact same issue, although changing the duration to a number (like in your previous post) doesn’t work for me.
Ange
August 16, 2022, 9:11pm
3
Hi!
No, no solution found so far…
It looks like the call to movie.stop
is being reached before movie.start
- what version of PsychoPy are you running in?
cpat3
August 18, 2022, 3:59pm
5
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!
Ange
August 18, 2022, 6:41pm
6
I tried different versions of the possibilities below:
It is not working in any of those I tried…
The thing is that is pays the movie as long as I want it, but it does not pass to the next routine which is a text component with a slider.
Ange
October 30, 2022, 1:45am
7
I got the answer here:
In searching other similar posts I found a thread which suggests that it might be because the movie is buffering.
However, I also saw that you’ve seen that thread so here is my suggestion.
Remove $stim_dur from the duration of the movie (make it blank)
Add the following code to Each Frame
if t > stim_dur:
continueRoutine = False
The solution is to:
Remove $stim_dur from the duration of the movie (make it blank)
Add the following code to Each Frame
if t > stim_dur:
continueRoutine = False