# Error 'python.exe has stopped working'

**URL:** <https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457>\
**Category:** Builder\
**Created:** [May 17, 2017, 1:20pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457 "2017-05-17T13:20:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![LauraJenkins](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@LauraJenkins](https://discourse.psychopy.org/u/LauraJenkins)\
**Post date:** [May 17, 2017, 1:20pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/1 "2017-05-17T13:20:56Z")

</div>

Hello,

I’m new to using PsychoPy but I’m having issues creating programmes with sounds.

I managed to create a programme with sounds and run the programme but now I keep getting an error message with ‘python.exe has stopped working’. The sound programme worked this morning so I know it’s not how I have created the experiment in builder, and I have not changed computers so I’m still using the same one for making and running the experiments.

This only happens in the programmes where I have sound files as I have created image programmes with no problems.

Can anyone help?

Thanks,  
Laura

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [May 17, 2017, 9:53pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/2 "2017-05-17T21:53:12Z")

</div>

Can we see the full and complete error message?

---

<div class="post-metadata">

**Author:** ![LauraJenkins](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@LauraJenkins](https://discourse.psychopy.org/u/LauraJenkins)\
**Post date:** [May 17, 2017, 11:04pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/3 "2017-05-17T23:04:46Z")

</div>

\*\*Hello, I have copied the message I get. \*\*

**The programme just stops, then I get a box which appears stating ‘python.exe has stopped working’. The link below shows an example.**  
[https://www.google.co.uk/search?q=python.exe+has+stopped+working&source=lnms&tbm=isch&sa=X&sqi=2&ved=0ahUKEwjT8LWnhPjTAhXEDMAKHY35AdkQ\_AUIBygC&biw=1366&bih=632](https://www.google.co.uk/search?q=python.exe+has+stopped+working&source=lnms&tbm=isch&sa=X&sqi=2&ved=0ahUKEwjT8LWnhPjTAhXEDMAKHY35AdkQ_AUIBygC&biw=1366&bih=632)

**When I look at the coder view, I see the following:**

Welcome to PsychoPy2!  
v1.85.1  
()

##### Running: E:\PSYCHOPY STUDY INFO\Quant Experiments\Quant4 Verbal [Dual.py](http://Dual.py)

pyo version 0.8.0 (uses single precision)  
Fatal Python error: (pygame parachute) Segmentation Fault

This application has requested the Runtime to terminate it in an unusual way.  
Please contact the application’s support team for more information.

**I had successfully created and ran the programme earlier today but when I came to run the programme a few hours later, this message appeared.**

**Thanks,**

**Laura**

---

<div class="post-metadata">

**Author:** ![LauraJenkins](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@LauraJenkins](https://discourse.psychopy.org/u/LauraJenkins)\
**Post date:** [May 17, 2017, 11:07pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/4 "2017-05-17T23:07:34Z")

</div>

**Sorry, I forgot to add that I am using Windows 7.**  
**Thanks,**  
**Laura**

---

<div class="post-metadata">

**Author:** ![bigaddo81](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@bigaddo81](https://discourse.psychopy.org/u/bigaddo81)\
**Post date:** [May 18, 2017, 1:53am UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/5 "2017-05-18T01:53:02Z")

</div>

I have recently started getting this problem too Windows 7 and 10. If I take out all sound stimuli it works but this is less than ideal.

This only happens if I run it from the builder. If I hit the “compile script” button and run it from the coder it works. Afterwards I get this output

##### Running: …\[GoNoGoMaster.py](http://GoNoGoMaster.py)

pyo version 0.8.0 (uses single precision)  
portaudio error in Pa\_AbortStream: Unanticipated host error  
Exception TypeError: “‘NoneType’ object is not callable” in \<bound method Server. **del** of \<pyolib.server.Server object at 0x09B33750\>\> ignored

---

<div class="post-metadata">

**Author:** ![LauraJenkins](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@LauraJenkins](https://discourse.psychopy.org/u/LauraJenkins)\
**Post date:** [May 18, 2017, 9:10am UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/6 "2017-05-18T09:10:34Z")

</div>

Yeah, I don’t have the option of removing the sounds as it’s a verbal number recognition task.

I’m hoping someone can help 🙂

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [May 18, 2017, 11:16pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/7 "2017-05-18T23:16:42Z")

</div>

Did you try the suggestion above from @bigaddo81 ?

> [@bigaddo81](#):
>
> This only happens if I run it from the builder. If I hit the “compile script” button and run it from the coder it works.

Have no idea why that would work but will be interested to see if it helps.

---

<div class="post-metadata">

**Author:** ![LauraJenkins](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@LauraJenkins](https://discourse.psychopy.org/u/LauraJenkins)\
**Post date:** [May 22, 2017, 9:01am UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/8 "2017-05-22T09:01:28Z")

</div>

This did not work for me!

I’ve given up and have changed the task slightly to omit sounds.

Maybe PsychoPy just doesn’t like my sound files ☹

Thanks,

Laura

---

<div class="post-metadata">

**Author:** ![sdrake](https://avatars.discourse-cdn.com/v4/letter/s/c37758/32.png) [@sdrake](https://discourse.psychopy.org/u/sdrake)\
**Post date:** [October 24, 2017, 12:46pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/9 "2017-10-24T12:46:45Z")

</div>

Hi,

I’m also getting this error sporadically and also with an experiment using sound files. It doesn’t happen when I run it on an older (~Win7) computer or on a Mac, just on a newer computer (Win10). It also doesn’t happen when running experiments without sound files. I’m updated to 1.85.2; has this issue been fixed in the last six months?

---

<div class="post-metadata">

**Author:** ![dfekety](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/dfekety/32/1978_2.png) [@dfekety](https://discourse.psychopy.org/u/dfekety)\
**Post date:** [January 30, 2018, 5:08pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/10 "2018-01-30T17:08:08Z")

</div>

I am also getting this exact error on Win10. It happens regardless of whether I try to run the experiment from the builder or the coder. I have also tried using multiple different audio file extensions (wav and mp3). Thanks in advance to anyone who can help!

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [January 30, 2018, 8:27pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/11 "2018-01-30T20:27:45Z")

</div>

mp3 files definitely won’t work, but wav files do.

Folks, the key is to try and narrow down what might be causing the problem. If it seems to be about sound files, is there a specific sound file that causes the issue? Do the sound demos work? What happens if you change the audio library in the PsychoPy preferences?

There’s very little we can do with the information we have so far.

---

<div class="post-metadata">

**Author:** ![Joanne](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@Joanne](https://discourse.psychopy.org/u/Joanne)\
**Post date:** [April 3, 2018, 7:37pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/12 "2018-04-03T19:37:30Z")

</div>

Did anything come of this? I’m also getting the same issue re. psychopy.exe has stopped working, for builder-view experiments that contain wav files. Unfortunately for me it is not a reproducible error - i.e. sometimes running the experiment causes it to crash, but then a few minutes later, with the exact same experiment, it will do (nothing has changed between these times). Compiling the script didn’t work (as mentioned above), using wav files, windows 7, psychopy 1.84.2.

---

<div class="post-metadata">

**Author:** ![juliagoolia28](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@juliagoolia28](https://discourse.psychopy.org/u/juliagoolia28)\
**Post date:** [October 23, 2018, 2:51pm UTC](https://discourse.psychopy.org/t/error-python-exe-has-stopped-working/2457/13 "2018-10-23T14:51:43Z")

</div>

I believe you need to go to the sound preferences and make one minor change: ['pyo,‘pygame’] needs to be [‘pygame’,‘pyo’]. I have had success with this in my own studies. Sometimes I also will remove .cfg files from my AppData when PsychoPy is being finicky, but be sure to repeat this setup solution or you will get this error (although this error is pretty vague and could be happening for a multitude of other reasons).
