Python script running always causes error massage

Hi,
I’m trying to run Python scripts in Dynamo but it always ends in such failure:

“Warning: TypeError : No method matches given arguments for OnExit: (<class ‘Autodesk.AutoCAD.ApplicationServices.DocumentLock’>, <class ‘type’>, <class ‘TypeError’>, <class ‘traceback’>) [’ File “”, line 37, in \n’]”

The “line 37” is the Pass statement after “t.Commit()” line.

After the failure comes an error message, similar to this: https://forum.dynamobim.com/t/application-does-not-support-just-in-time-jit-error/82260

Then Civil 3D is crashing.

I’m a beginner user of Dynamo and Python, so I got stuck where to search the reason of the failure. I made a simple dyn file, that also causes me the problem. It is a part of @mzjensen’s demo script from https://www.youtube.com/watch?v=6NUu4sRMkTU&list=PLdlF7MirPEC2yNFTGymESd3t7Xosfk9c2&index=12, so it should work. The input for me was an alignment. I can get back “a” as an output, but for “b” the failure comes.

Have you seen similar problem yet?

proba.dyn (5.0 KB)

I found out that the “Select Object” node gave me a list, instead of the object itself. When I select e.g. an alignment, the output is a list, that contains the alignment. And thats why the script didn’t run well.

But I haven’t got a clue why does the “Select Object” node generate list and why collapses the whole software if I make a mistake.

@denes.nagy, add x[0]

2 Likes