Skip to content
Discussion options

You must be logged in to vote

Just to add my 2 cents because I've tripped over this recently so I can confirm this still happens.

The issue as far as I can tell is with how destructors work....or rather don't work. In a basic class you can add @pyscript_compile decorators to the destructor (and explicitly call del , however for classes with inheritence, this trick still doesn't work. Even constructors dont work in this instance.

My suggestion is to avoid calling the constructor in the global scope of the module. This is because it will be called when the module is loaded which can lead to issues depending on load order wrt entites. Instead, construct the objects in a startup function.

@time_trigger("startup")
def on_s…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@carlolars
Comment options

Answer selected by carlolars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants