# Creating UStructs in Python

**URL:** <https://forums.unrealengine.com/t/creating-ustructs-in-python/140499>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [March 27, 2020, 7:43pm UTC](https://forums.unrealengine.com/t/creating-ustructs-in-python/140499 "2020-03-27T19:43:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EPG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EPG](https://forums.unrealengine.com/u/EPG)\
**Post date:** [March 27, 2020, 7:43pm UTC](https://forums.unrealengine.com/t/creating-ustructs-in-python/140499/1 "2020-03-27T19:43:02Z")

</div>

I defined a UStruct in C++, consisting an FString and two integers. I want to create one of these so I wrote these lines:

> [@](#):
>
> ```
> trackinfo = ue.get_type_from_struct(ue.TrackInfo)
> trackinfo.set_editor_property("label", track_name)
> trackinfo.set_editor_property("from", start)
> trackinfo.set_editor_property("to", end) 
> 
> ```

But I keep getting these errors:

> [@](#):
>
> LogPython: Error: Traceback (most recent call last):  
> LogPython: Error: File “\<string\>”, line 1, in \<module\>  
> LogPython: Error: File “C:/Program Files/Epic Games/UE\_4.23/Engine/Plugins/MovieScene/SequencerScripting/Content/Python\zenify.py”, line 110, in \<module\>  
> LogPython: Error: run()  
> LogPython: Error: File “C:/Program Files/Epic Games/UE\_4.23/Engine/Plugins/MovieScene/SequencerScripting/Content/Python\zenify.py”, line 31, in run  
> LogPython: Error: trackinfo.set\_editor\_property(“label”, track\_name)  
> LogPython: Error: TypeError: descriptor ‘set\_editor\_property’ requires a ‘StructBase’ object but received a ‘str’
