Console runs script that transform doesn't

Hello,

I have a project script where I'm using deepcopy function from copy library. When I test the script thru the script console it works fine. If I use it in script transform it chokes at that function and throws the following error:

File "module:model.procedure", line 775, in getDynamicOperationList File "/usr/local/bin/ignition/user-lib/pylib/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/local/bin/ignition/user-lib/pylib/copy.py", line 329, in _reconstruct y = callable(*args) File "/usr/local/bin/ignition/user-lib/pylib/copy_reg.py", line 93, in newobj return cls.new(cls, *args) TypeError: com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ArrayWrapper(): expected 40 args; got 0

Does anybody have a clue on how to work around this?

Thanks!

deepcopy doesn't "know" how Perspective's internal objects work; it's a bigger hammer than you need.

Try the code in this post to directly convert to 'native' list and dict objects:

You guys never disappoint. Works like a charm, thank you!