Skip to content

CreateRuntime crashes after workflow restart when ExpressionTransform is used with a Dynamic Class #32

Description

@rachelmcassidy

I recently implemented python scripting into my workflows, and I've come across an incompatibility with the ExpressionTransform operator. I've attached a simple workflow that will hopefully be able to recreate the following issue:

  • When ExpressionTransform is used to create a Dynamic Class, the python runtime will crash on the second attempt to run the workflow with the error "Exception has been thrown by the target of an invocation." It will run again if I restart the editor or click "Reload extensions".

  • If ExpressionTransform runs some other operation like Convert.ToDouble(it), the workflow and python scripts will run normally for as many times as the workflow is restarted.

Potentially relevant context:

  • I recently updated all bonsai packages to their latest versions.
  • Python version: 3.12.7
  • The output of ExpressionTransform dynamic classes no longer shows as DynamicClassX, but rather <>f_AnonymousTypeX<>, but still works with the correct fields.

Is there another way to set up the python runtime to avoid this issue, or should I remove all dynamic classes from my workflow? Thanks for any suggestions you can provide.

python_scripting_crash_test.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions