# Can't capture property path 'Static Mesh / Material\[0\]', with Python, when scripting variant manager

**URL:** <https://forums.unrealengine.com/t/cant-capture-property-path-static-mesh-material-0-with-python-when-scripting-variant-manager/473856>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, Scripting, question\
**Created:** [November 2, 2020, 1:58am UTC](https://forums.unrealengine.com/t/cant-capture-property-path-static-mesh-material-0-with-python-when-scripting-variant-manager/473856 "2020-11-02T01:58:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_146c2888](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_146c2888](https://forums.unrealengine.com/u/anonymous_user_146c2888)\
**Post date:** [November 2, 2020, 1:58am UTC](https://forums.unrealengine.com/t/cant-capture-property-path-static-mesh-material-0-with-python-when-scripting-variant-manager/473856/1 "2020-11-02T01:58:06Z")

</div>

I’m scripting the Variant Manager with python to auto build a LevelVariantSets asset with some actors and materials. I can’t figure out a way to capture the ‘Static Mesh Component / Material[0]’ property path. I always get the following error:

**LogVariantManager: Error: Actor ‘Sphere’ does not have a property with path ‘Static Mesh Component / Material[0]’!**

If I set up a LevelVariantSets object in the Variant Manager manually, I can set this property path, just not through python scripting. Also, tried to capture a bunch of other property paths with python and they all work. This seems like a python bug.

some sample code:

var\_mngr = unreal.VariantManagerLibrary()

var\_sets = var\_mngr.create\_level\_variant\_sets\_asset(‘variant\_test\_new’, ‘/Game’)

var\_set = unreal.VariantSet()

var\_set.set\_display\_text(‘color’)

variant = unreal.Variant()

variant.set\_display\_text(‘blue’)

var\_mngr.add\_variant\_set(var\_sets, var\_set)

var\_mngr.add\_variant(var\_set, variant)

world\_util = unreal.EditorLevelLibrary()

actor\_sel = world\_util.get\_selected\_level\_actors()

for actor in actor\_sel:

```
var_mngr.add_actor_binding(var_mngr, actor)
var_mngr.capture_property(var_mngr, actor, 'Static Mesh Component / Material[0]')	

```

Thanks for any any insight you can provide! This is a weird one…

---

<div class="post-metadata">

**Author:** ![MariaButto](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MariaButto](https://forums.unrealengine.com/u/MariaButto)\
**Post date:** [September 9, 2024, 12:26pm UTC](https://forums.unrealengine.com/t/cant-capture-property-path-static-mesh-material-0-with-python-when-scripting-variant-manager/473856/2 "2024-09-09T12:26:59Z")

</div>

Hi. Following up the question as I would like to solve this issue too. Still get it inside Unreal 5.4. Any news about this? Thanks
