# Experiment runs from builder but crashes with no warnings in coder (after editing in coder)

**URL:** <https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460>\
**Category:** Builder\
**Created:** [October 22, 2020, 1:37pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460 "2020-10-22T13:37:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erholton](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@erholton](https://discourse.psychopy.org/u/erholton)\
**Post date:** [October 22, 2020, 1:37pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460/1 "2020-10-22T13:37:40Z")

</div>

If this template helps then use it. If not then just delete and start from scratch.

MacOS Catalina 10.15.6  
**PsychoPy version** 2020.2.4  
**Standard Standalone? (y/n)** yes  
**What are you trying to achieve?:** I’m making my experiment in the builder but want to add some snippets in the coder. While I can run it from the coder before adding any snippets, as soon as I add any code the experiment launches the grey screen but then immediately crashes with no warnings or alerts in either the coder console or the experiment runner output. It is likely my coding snippets have issues as I’m very new to python, but without being able to view the warnings I can’t debug.

I am not sure whether this is a problem with running any edits from the coder, or whether the problem lies in showing errors in the output. Any advice would be very appreciated!

**What did you try to make it work?:** I was wondering whether it was a problem with using runner in the new versions  
i.e. [New version of Psychopy doesn't compile script](https://discourse.psychopy.org/t/new-version-of-psychopy-doesnt-compile-script/15987)

However, I can’t find userPrefs.cfg file anywhere, and I’m not even sure if this is the issue in the first place because my task seems to work from the Coder _before_ I make any edits.

I cannot paste any error code as I am not getting any error output

---

<div class="post-metadata">

**Author:** ![erholton](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@erholton](https://discourse.psychopy.org/u/erholton)\
**Post date:** [October 22, 2020, 1:51pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460/2 "2020-10-22T13:51:32Z")

</div>

Resetting Preferences fixed this problem, I can now see errors in the console

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [October 22, 2020, 3:37pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460/3 "2020-10-22T15:37:52Z")

</div>

Hi There,

Before going to much further, please can I ask why you are ading code snippets in coder, rather than using a code component in builder itself? (i.e. in the component panel under ‘custom’). These are often easier to implement (and will mean you can later run your exp online if you want to).

Becca

---

<div class="post-metadata">

**Author:** ![erholton](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@erholton](https://discourse.psychopy.org/u/erholton)\
**Post date:** [October 22, 2020, 3:50pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460/4 "2020-10-22T15:50:16Z")

</div>

thanks for this tip, I’ve just switched to doing this!

---

<div class="post-metadata">

**Author:** ![Becca](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/becca/32/34260_2.png) [@Becca](https://discourse.psychopy.org/u/Becca)\
**Post date:** [October 22, 2020, 3:51pm UTC](https://discourse.psychopy.org/t/experiment-runs-from-builder-but-crashes-with-no-warnings-in-coder-after-editing-in-coder/17460/5 "2020-10-22T15:51:26Z")

</div>

fab - hopefully you find that resolves your issue and is a bit simpler!

Becca
