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
I recently implemented python scripting into my workflows, and I've come across an incompatibility with the
ExpressionTransformoperator. I've attached a simple workflow that will hopefully be able to recreate the following issue:When
ExpressionTransformis 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
ExpressionTransformruns some other operation likeConvert.ToDouble(it), the workflow and python scripts will run normally for as many times as the workflow is restarted.Potentially relevant context:
ExpressionTransformdynamic classes no longer shows asDynamicClassX, 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