I have seen this happen before when your Dynamo version and/or Package version(s) are different than the onces used in the script, are you sure you have the exact same Package Versions?
It is a 99% certainly that this is a Revit add-in conflict - I have yet to see another route cause. To identify which:
Restart your CPU
Disable ALL Revit add-ins (seriously get them all - they like to hide sometimes)
Launch Revit and start a brand new project
Open Dynamo and confirm the issue doesn’t persist
Quit Revit
Collect the journal
Enable all th add-ins again
Launch Revit and start a brand new project
Open Dynamo and confirm the issue was recreated
Quit Revit
Collect the journal
Compare the two journals, looking for “API_ERROR” lines in the initial startup (before you created the new file) of each journal.
If the API_ERROR line occurred in both journals you can discard it.
For each API_ERROR line in the second journal which isn’t in the first journal, look at the lines shortly before and shortly after - these will indicate which add-in is causing the conflict.
Disable those add-ins and confirm the issue doesn’t reproduce anymore.
If not, update the add-in and the issue should be resolved (you may have to contact the add-in provider accordingly).
If so, provide the journals noted above to Autodesk support via standard ticketing process so they can identify any further issues.
I was a little bit shocked by Jacob’s reply, so I started of with Daan’s comment, and this turned out to be the problem: I missed on package on my freshly installed PC. That was all. I didn’t expect that such a minor issue could lead to this behaviour.