Is Dynamo 1.3.1 Broken?

I am currently getting an error when using the ‘NewElectricalSystem’ function in a Dynamo Python Node. The function returns “TypeError: Expected Document, got Document”… which is really weird. I have been using ‘doc’ to reference the current document up until calling that function, and it has worked perfectly!!!

Can anyone help? I don’t have the slightest clue what’s going on.

Could you please show us what is written at line 94 where the actual error is.

Sorry, I should have stated this in my original post, but I removed my user defined functions from the code so that it could all be within one screenshot. Essentially, line 50 IS line 94. The source of the TypeError is in the picture at line 50.
Original Code:

I’m not a Python guy (though I’m learning), but it’s really hard to troubleshoot when all we can see is screenshots of code snippets. Can you post your code into the forum or upload the DYN directly? Feel free to remove any non-related code first.

1 Like

I think line 33 is the issue by just looking at your screen shots…maybe the call has change on the api. Please post dyn as suggested.

For future reference, the following syntax solved my problem:

‘NewElectricalSystem’ does take the current document as an input argument, however, ‘NewElectricalSystem’ must be expressed as an attribute of “doc.Create.”

1 Like

good man…that exactly what I read about when you post your query…line 33 then is correct but as you said it must be combined with doc.create.