# MovieStim1/2/3 errors/pause/crash

**URL:** https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920
**Category:** Coding
**Tags:** movies
**Created:** [February 15, 2017, 1:17pm UTC](https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920 "2017-02-15T13:17:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![baya](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@baya](https://discourse.psychopy.org/u/baya)
#### Post date: [February 15, 2017, 1:17pm UTC](https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920/1 "2017-02-15T13:17:17Z")

</div>

Hi,

I’m using PsychoPy 1.84.2, on Windows 7 64

I’m trying to present instructions, then a movie (relatively large, 903s, mkv file) while simultaneously presenting a sound whenever a key is pressed, and am getting different problems with MovieStim1/2/3. I’m afraid I cannot put a link to the movie itself due to copyright.

Using MovieStim:  
When presenting only the movie it works fine.  
When adding a sound, (even without playing it, just the line below), PsychoPy crashes (no error message)  
sound\_1 = sound.Sound(u’A’, secs=0.2)

Using MovieStim2:  
The movie pauses a little after the beginning (the rest seems ok). Maybe due to logging of skipped frames? but setting warning to critical does not help.  
Initially adding a sound before the definition of the movie caused a crash (same as MovieStim), but adding it after worked. Now it started crashing even when the sound is defined after. However, if I add an instruction component before the movie it works.  
So the experiment works with MovieStim2, but the timing is important, and the pausing of the movie would be problematic.

Using MovieStim3:  
Usually (at some point it worked when only presenting a movie, but then stopped) it gives the following memory error (related to sound, without audio it works fine):  
pyo version 0.8.0 (uses single precision)  
Traceback (most recent call last):  
File “C:\Users\ab08\Documents\PsychoPy\segment\_mov\_MovieStim3.py”, line 83, in   
depth=0.0,  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\contrib\lazy\_import.py”, line 120, in **call**  
return obj(\*args, \*\*kwargs)  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\[movie3.py](http://movie3.py)”, line 124, in **init**  
self.loadMovie(self.filename)  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\[movie3.py](http://movie3.py)”, line 181, in loadMovie  
jwe\_tmp.audio.to\_soundarray(),  
File “”, line 2, in to\_soundarray  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\[decorators.py](http://decorators.py)”, line 54, in requires\_duration  
return f(clip, \*a, \*\*k)  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\moviepy\audio\[AudioClip.py](http://AudioClip.py)”, line 114, in to\_soundarray  
chunksize=buffersize))  
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\numpy\core\shape\_base.py”, line 230, in vstack  
return \_nx.concatenate([atleast\_2d(\_m) for \_m in tup], 0)  
MemoryError

Additional tests I tried to run:

- The same seems to happen when using the Builder.
- Following one of the threads I tried using a previous version with:  
import psychopy  
psychopy.useVersion(‘1.80.06’)  
But got an error that it is an unknown version (for all versions I tried)

Any ideas on how to fix this?

Thank you!  
Aya

---

<div class="post-metadata">

### Author: ![baya](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@baya](https://discourse.psychopy.org/u/baya)
#### Post date: [February 15, 2017, 3:47pm UTC](https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920/2 "2017-02-15T15:47:40Z")

</div>

Perhaps I was too hasty in posting the question - a simple solution worked, converting the movie from mkv to mp4.  
As reference for others who may experience the same problem in the future - the crashes/errors still occur as in the message above, but when using MovieStim2 in the specific configuration that worked, now it doesn’t pause after 1-2s.

---

<div class="post-metadata">

### Author: ![baya](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@baya](https://discourse.psychopy.org/u/baya)
#### Post date: [February 15, 2017, 4:17pm UTC](https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920/3 "2017-02-15T16:17:13Z")

</div>

I apologise for the back and forth, it seems it was a fluke, it still pauses. So any ideas would be greatly appreciated!

Thanks!

---

<div class="post-metadata">

### Author: ![baya](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@baya](https://discourse.psychopy.org/u/baya)
#### Post date: [March 6, 2017, 2:45pm UTC](https://discourse.psychopy.org/t/moviestim1-2-3-errors-pause-crash/1920/4 "2017-03-06T14:45:19Z")

</div>

Solved! In case anyone encounters a similar problem:

Based on this topic:

> [@Randomly 'python.exe has stopped working' - After Windows update?](https://discourse.psychopy.org/t/randomly-python-exe-has-stopped-working-after-windows-update/1232/9):
>
> Running python (the “python.exe” file) in XP compatibility mode and giving it administrator rights (don’t know if that’s necessary…) seems to alleviate the problem for me for the time being. Since my task isn’t time critical, that’s OK for me, but I don’t know if this setting affects performance in more demanding taks? /Thomas K.

I installed pygame and set that to be the first option, before pyo. Now I can present a movie using MovieStim2 without freezing and without crashes.
