Python Script not working

Hi,

I have tried to create a list of Levels and Zones fro a workset create script. However, after following several tutorials (to the letter) my Python script shows the error message below.

“Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Insufficient memory within specified address space range to continue the execution of the program.”

Would anyone be able to guide me to a solution?

`LevelNames = IN[0]
ZoneNames = IN[1]

WorksetNames = list()

for Lvl in LevelNames:
for ZN in ZoneNames:
WorksetNames.append(Lvl + “_” + ZN)

OUT = WorksetNames`

Interesting… https://support.microsoft.com/en-gb/help/3152158/out-of-memory-exception-in-a-managed-application-that-s-running-on-the

I do notice that you’re not importing the common language runtime, Revit API, or any other module, which could be what is triggering this error. After introducing such this may work correctly.

Python node should work perfectly fine with nothing imported…
@JocoYo is that correct that the output result should be only a 48 element list? So nothing too huge?

I have tried to run your code and did not have this error, might be a bug on your machine/version?

Hi Maciek,

Thanks for the prompt response :wink:. Is there an easy fix for this. I am running Revit 2018.3 with Dynamo 2.0.3

Hi again,
I have tried on 2.0.3 now as well and it worked (Revit 2019.2 though)
Have you worked with the Python node before on this machine without such problems?

1 Like

Unfortunately, I have not been successful with the python node before on this machine and I am just starting to script so I have not done it in any other either.

I have just tried again without making any changes to the code and it just worked :thinking:
Fickle program “Dynamo” :sweat_smile: I guess it just needed to be closed and open again
@maciek.glowka, Thanks for checking and the helps though. Much appreciated