# \[Bug\] system.util.sendMessage fails with remoteServers when payload is not a dict

**URL:** <https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 14, 2022, 6:57pm UTC](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040 "2022-01-14T18:57:23Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 7, 2022, 8:26pm UTC](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040/11 "2022-10-07T20:26:04Z")

</div>

Yeah, it pukes if it hits an object that it isn’t prepared for.

Here is a pure Jython wrapper that should help.

> [@Copy dictionary and modify it without affecting the original](https://forum.inductiveautomation.com/t/copy-dictionary-and-modify-it-without-affecting-the-original/62297/9):
>
> As @bkarabinchak.psi pointed out even though the structure “looks” like a dict it isn’t actually a dict. Actually the type of a perspective property when accessed from a script is:[com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper.ObjectWrapper](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.1/com/inductiveautomation/perspective/gateway/script/PropertyTreeScriptWrapper.ObjectWrapper.html). Thus deepcopy chokes when it runs into an object that it doesn’t know how to handle. If you need a true deepcopy, then you have couple of options. Write a function which recursively loops through the structure and correctl…

---

_[View the full topic](https://forum.inductiveautomation.com/t/bug-system-util-sendmessage-fails-with-remoteservers-when-payload-is-not-a-dict/55040)._
