# How do you add a section to a MovieSceneAudioTrack in python without crashing the editor?

**URL:** <https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019>\
**Category:** Editor Scripting\
**Tags:** Python, crash-editor, unreal-engine, crash, question\
**Created:** [January 24, 2019, 9:47pm UTC](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019 "2019-01-24T21:47:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Choop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_Choop](https://forums.unrealengine.com/u/The_Choop)\
**Post date:** [January 24, 2019, 9:47pm UTC](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019/1 "2019-01-24T21:47:11Z")

</div>

Hello, executing the audioTrack.add\_section() in the below causes the editor to crash. I can add sections to other types of tracks but the unreal.MovieSceneAudioTrack specifically seems to have this issue. Does anyone know of a workaround for this?

```
sequence = asset_tools.create_asset(name, path, unreal.LevelSequence, factory)
audioTrack = sequence.add_master_track(unreal.MovieSceneAudioTrack)

# Crashes the editor
audioSection = audioTrack.add_section()
```

---

<div class="post-metadata">

**Author:** ![Max.Chen](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/max.chen/32/1194502_2.png) [@Max.Chen](https://forums.unrealengine.com/u/Max.Chen)\
**Post date:** [January 25, 2019, 7:09pm UTC](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019/2 "2019-01-25T19:09:09Z")

</div>

Looks like this is a legitimate crash. I entered this for tracking:

[https://issues.unrealengine.com/issue/UE-69088](https://issues.unrealengine.com/issue/UE-69088)

And have fixed the issue for the upcoming 4.22 release. If you compile the engine yourself, the fix is 4814663

Thanks for the report!

---

<div class="post-metadata">

**Author:** ![The\_Choop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_Choop](https://forums.unrealengine.com/u/The_Choop)\
**Post date:** [January 25, 2019, 7:48pm UTC](https://forums.unrealengine.com/t/how-do-you-add-a-section-to-a-moviesceneaudiotrack-in-python-without-crashing-the-editor/442019/3 "2019-01-25T19:48:39Z")

</div>

Thanks so much for the fix! Glad I could help identify it.
