Code block outputting null with simple number

I’ve had a search but can’t find anything similar to this problem. I was happily writing a script, testing it as I went and all was working well, then just as I was getting to the end (typical) I started to experience strange behavior in Dynamo, where code blocks that I have used with simple numbers in them (as I’m going to swap these out for some other custom nodes that generate these numbers later) started to output ‘null’ where others still out put the number that they are meant to output. I also had a spell where one code block was always outputting the number 2 no matter what number was entered into it, see screen shot of this problem below;

I’m also getting some String.Substring nodes giving me ‘cyclic dependency’ errors, but I can’t see that I have any unintentional ‘loops’ built into my graph, as it’s quite simple.

I’m running this version of Dynamo, with Revit 2017;


Dynamo says it has updates to install, but when i click the green cloud it asks if it can shut down Dynamo & Revit which I click ok, then it seems to do nothing and if I reopen both later it still says it needs to install updates.

Any help or suggestions would be appreciated.


I had a lot of issues with Dynamo 2.0.2 builds, and ended up installing Dynamo 2.0.3 in the end.
This fixed a lot of ‘unexplainable’ errors I commonly ran into.


Maybe worth testing that version instead? I installed it by downloading the .exe from the daily builds and installing with Revit/Dynamo closed.

A common answer I see to these sorts of bug is sometimes that another plugin is conflicting with Dynamo - did you install any new ones recently? Impacting one-off code blocks seems pretty major though.

I’ve tested your example in my Dynamo and it seems to work so don’t worry, you’re not going crazy!