# GatewayException: Error serializing parameters

**URL:** <https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499>\
**Category:** Ignition\
**Created:** [June 12, 2017, 3:18pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499 "2017-06-12T15:18:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [June 12, 2017, 3:18pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/1 "2017-06-12T15:18:08Z")

</div>

Greetings…

I am having an issue writing a value to an memory tag via script. The error generated is:  
**GatewayException: Error serializing parameters.**  
**caused by NotSerializableException: org.python.core.ReflectedArgs**  
**Ignition v7.9.3 (b2017060210)**  
**Java: Oracle Corporation 1.8.0\_131**

The memory tag is configured as Type: Integer and Read/Write. It will write to the tag if using binding, but chokes on script. The component I am firing this from is a One-Shot button on the actionPerformed handler, and the value being written is the property: Set Value (in this case, the integer 180)

The script causing the error:

```auto
OSvalue = event.source.setValue
if event.source.parent.parent.parent.getComponent('ExecuteGroup').getComponent('Toggle Button 1').componentEnabled:
   system.tag.write("ASRS/CraneMove/CraneDestPos_Abs", OSvalue)
else:
   system.tag.write("ASRS/CraneMove/CraneStartPos_Abs", OSvalue)

```

Documentation says that the ‘value’ argument for system.tag.write is of type Int, so I’m a little confused why this will not write to the tag. The path to component and tag were generated using the browse method, so they are correct. I would appreciate any assistance. I hope it is common problem with an easy fix.

Kind regards,  
Steve

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2017, 3:26pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/2 "2017-06-12T15:26:40Z")

</div>

Have you printed/checked the value of `OSValue`?

This line:  
`OSvalue = event.source.setValue`

looks suspect to me.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2017, 3:33pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/3 "2017-06-12T15:33:40Z")

</div>

Yeah, so the one-shot button actually has a method on it named `setValue` which is what you’re getting when you try to reference the property.

Try this instead: `OSValue = event.source.getSetValue()`

Just an unfortunate naming clash here.

---

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [June 12, 2017, 4:06pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/4 "2017-06-12T16:06:26Z")

</div>

Kevin, thank you! That worked great. Is the ‘getxx()’ nomenclature the normal syntax for revealing values?

I have to say though, that is less than user friendly - especially when using the ‘browse’ icon to drill down to the Set Value property - one would think a variable would be set to the value within the method and not the Method descriptor.

Cheers,  
Steve

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2017, 4:17pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/5 "2017-06-12T16:17:18Z")

</div>

Everything is getXxYy() and setXxYy() “under the hood” but are also given the Python-friendly property accessors that you’re accustomed to using.

Like I said, this is an unfortunate naming clash where the property called ‘Set Value’ or ‘setValue’ clashes with a method name on the button.

---

<div class="post-metadata">

**Author:** ![sbrannen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbrannen/32/3459_2.png) [@sbrannen](https://forum.inductiveautomation.com/u/sbrannen)\
**Post date:** [June 12, 2017, 4:47pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/6 "2017-06-12T16:47:56Z")

</div>

Thank you. Good info. I could find no info in the manual regarding this syntax. Your results may vary.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 7, 2025, 3:34pm UTC](https://forum.inductiveautomation.com/t/gatewayexception-error-serializing-parameters/14499/7 "2025-03-07T15:34:13Z")

</div>

Split this topic on March 7, 2025, 3:34pm UTC

3 posts were split to a new topic: [Error serializing parameters from propertyChange script](https://forum.inductiveautomation.com/t/error-serializing-parameters-from-propertychange-script/103385)
