The managed object is not valid - Dynamo crashes on 'TransactionManager.Instance.EnsureInTransaction(doc)'

Hello friends. The following error is bugging me since many hours.

IronPythonEvaluator.EvaluateIronPythonScript operation failed. 
Traceback (most recent call last):
File " < string > ", line 33, in < module>
Exception: The managed object is not valid.

I’m not sure why the error has occur would appreciate if someone share its solution with me. Thank you

See what’s in this thread, you will find examples of commented scripts that will surely help you to get started:

1 Like

Edit: I just noticed your doc way down there :slight_smile:

1 Like

Hi @Yna_Db thanks for sharing your input and referring me to your article on learning the python for dynamo step by step. The article is very good, I’ve bookmarked it. However, the article don’t help the current problem that I’m facing in Dynamo. I’m not sure why the dynamo is crashing. Would you mind sharing specific solution?

yes it is there, no problem thanks for your input. Any other solution would you like to share?

As @Martin_Spence1 mentioned, the variable doc was not defined in your script but since you changed it in the meantime, I don’t know what is still needed here. There is an illustration of the use of Transactions on the Github’s page mentioned in the link I sent. I surely recommend to read, understand and sum-up this page and the Primer’s ones before trying to write any piece of code. Good luck!

1 Like

@Yna_Db The doc variable was already there since the beginning of the post. Its a strange error that is bugging me since few hours. Will read your shared article in detail tonight. Hope will find its resolution soon. Thanks for the help, appreciate it.

It could also simply be related to the fact the graph has run while the inputs are not plugged…

1 Like

It might be the root cause of the problem. Okay, I’ll test it by writing the complete script, will share the feedback later. Thanks for the heads-up. really appreciate your input. Cheers