IronPythonEvaluator.EvaluateIronPythonScript error when running every python script

One of my coworkers has this weird problem that after installing Dynamo he cannot run any python nodes (not even from custom packages like Lunchbox or Modelical). They all present the error:

IronPythonEvaluator.EvaluateIronPythonScript operation failed
Traceback (most recent call last):
File “”, line 2, in
IOError: System.IO.IOExecption: Could not add reference to assembly ProtoGeometry at IronPython.Runtime.ClrModule.AddReference(CodeContext context, String name)

The traceback differs per python script, but as far as I can see is always the IOError.System.IO.IOException.

So far we’ve reinstalled Dynamo, reinstalled Revit, tried different versions of dynamo & Revit.
Looked up on this forum and found a similar problem someone had (can’t find this post anymore). This person had IronPythonShell 2.7.2 and 2.7.3 installed. I’ve verified that on this PC only 2.7.3 is installed.

All the OOTB nodes provided with Dynamo work flawlessly, but as soon as I use Python I get this error message and the script outputs a null value.

What is causing this problem and more important how can I solve this issue?

Python pathing May matter here - where have you installed IronPython and Dynamo?

1 Like

The original installfolders:

IronPython is installed in C:\Program Files (x86)\IronPython 2.7
Dynamo is installed in C:\Program Files\Dynamo\

Can you post the most recent Dynamo log from his system?

I’ve attached the log file here.
Thanks for looking in to it Jacob. Personally I’m out of ideas to look at.

dynamoLog_0dc7a28f-e2b1-442a-9e92-c4eeff2fd018.txt (4.2 KB)

Well, nothing there… I’ll ideate on it for a bit. Perhaps @Michael_Kirschner2 has some ideas?

can you try removing all packages and try again with a clean dynamo?
Also if you have sandbox installed in your DynamoCore folder try from there as well.

1 Like

Hi @Frits_Cornelius

Could you try calling ProtoGeometry direct from its path:
clr.AddReferenceToFileAndPath(r'C:\Program Files\Dynamo\Dynamo Core\2\ProtoGeometry.dll')

1 Like

Hi @Kulkul,

Thanks for thinking along. Tried your solution, but get the same error:
IronPython

Thanks @Michael_Kirschner2,

Tried a clean dynamo without packages, same problem.
Sandbox also has this problem.

@Frits_Cornelius Do you have Protogeometry in folderC:\Program Files\Dynamo\Dynamo Core\2\ ?

@Kulkul
Hi, I have same problem now.
And as you suggested, I have only the folder Dynamo Core 1.3
But I am using Dynamo core 2.6.1 / Dynamo Revit 2.6.1
What do I have to do?