# Saving blueprints inheriting from Python classes crashes the editor

**URL:** <https://forums.unrealengine.com/t/saving-blueprints-inheriting-from-python-classes-crashes-the-editor/137073>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [January 25, 2020, 12:47pm UTC](https://forums.unrealengine.com/t/saving-blueprints-inheriting-from-python-classes-crashes-the-editor/137073 "2020-01-25T12:47:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BringTheSmiles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BringTheSmiles](https://forums.unrealengine.com/u/BringTheSmiles)\
**Post date:** [January 25, 2020, 12:47pm UTC](https://forums.unrealengine.com/t/saving-blueprints-inheriting-from-python-classes-crashes-the-editor/137073/1 "2020-01-25T12:47:04Z")

</div>

Hi, all

I’ve started playing around with python in Unreal, specifically trying to find the best way of interfacing with EditorUtilityWidgets to provide some UI for tools and scripts.  
However, the editor will crash when saving blueprints based on my python classes, so am I misunderstanding how this is supposed to work?  
I’m using UE4.24.

```auto

import unreal

@unreal.uclass()
class MyPythonWidget(unreal.EditorUtilityWidget):

    @unreal.ufunction(ret=int, params=[int], meta=dict(Category="My functions"))
    def do_some_work(self, some_int):
        return 42 + some_int

```

Here’s a simple example of a widget I’m able to:

- base a blueprint on
- put that WidgetBlueprint inside a standard Editor Utility Widget
- run that Widget and it’s able to run my python code

My problem is the engine will crash when trying to save the WidgetBlueprint.

```auto

Assertion failed: !Export.SuperIndex.IsNull() [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/SavePackage.cpp] [Line: 4986] Export Struct (/Game/NewBlueprint.NewBlueprint_C) of type (WidgetBlueprintGeneratedClass) inheriting from (/Engine/PythonTypes.MyPythonWidget) of type (PythonGeneratedClass) has not mapped super struct.

```

Here’s the error I’m having trouble deciphering.  
If I’m going about this the wrong way please let me know, as I definitely haven’t quite grasped the implications of the whole transient/reflection system.

Cheers

---

<div class="post-metadata">

**Author:** ![LinfinityVerse](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LinfinityVerse](https://forums.unrealengine.com/u/LinfinityVerse)\
**Post date:** [February 20, 2024, 4:45am UTC](https://forums.unrealengine.com/t/saving-blueprints-inheriting-from-python-classes-crashes-the-editor/137073/2 "2024-02-20T04:45:30Z")

</div>

This is still the case for 5.3.2; I guess the reason is that Python uclass’es are “transient” (they only come to exist when you run the python code), while saving an asset might require the entire inheritance chain to be “persistent” - what if you load the asset, but the parent Python uclass has not formed (by running the Python code)? or some other Python code happens to hijack the same name with totally different semantics?

Furthermore, a BP asset is often times meant to be spawned at runtime - so having a transient (and EDITOR ONLY) python parent class of this BP would definitely cause runtime issues.

But I’d suggest that instead of a crash, maybe this could be more gently a dialogue box instead?
