# Invalid UUID string:

**URL:** <https://forum.inductiveautomation.com/t/invalid-uuid-string/14818>\
**Category:** Ignition\
**Created:** [July 18, 2017, 4:26pm UTC](https://forum.inductiveautomation.com/t/invalid-uuid-string/14818 "2017-07-18T16:26:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [July 18, 2017, 4:26pm UTC](https://forum.inductiveautomation.com/t/invalid-uuid-string/14818/1 "2017-07-18T16:26:43Z")

</div>

I'm trying to kill a running chart via a button on a window, however I keep getting the error below.

Code:

> chartID=event.source.parent.msgChartID  
> system.sfc.cancelChart(str(chartID))

Error:

> Traceback (most recent call last):  
> File "event:actionPerformed", line 13, in   
> at java.util.UUID.fromString(Unknown Source)

> at com.inductiveautomation.sfc.scripting.SfcScriptingFunctionsPyWrapper.cancelChart(SfcScriptingFunctionsPyWrapper.java:86)

> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

> at java.lang.reflect.Method.invoke(Unknown Source)

> java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Invalid UUID string:

> at org.python.core.Py.JavaError(Py.java:495)  
> at org.python.core.Py.JavaError(Py.java:488)  
> at org.python.core.PyReflectedFunction. **call** (PyReflectedFunction.java:188)  
> at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. **call** (ScriptManager.java:438)  
> at org.python.core.PyObject. **call** (PyObject.java:387)  
> at org.python.core.PyObject. **call** (PyObject.java:391)  
> at org.python.pycode.\_pyx272.f$0(event:actionPerformed:13)  
> at org.python.pycode.\_pyx272.call\_function(event:actionPerformed)  
> at org.python.core.PyTableCode.call(PyTableCode.java:165)  
> at org.python.core.PyCode.call(PyCode.java:18)  
> at org.python.core.Py.runCode(Py.java:1275)  
> at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:657)  
> at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:183)  
> at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:284)  
> at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)  
> at com.sun.proxy.$Proxy23.actionPerformed(Unknown Source)  
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)  
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)  
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)  
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)  
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)  
> at java.awt.Component.processMouseEvent(Unknown Source)  
> at javax.swing.JComponent.processMouseEvent(Unknown Source)  
> at java.awt.Component.processEvent(Unknown Source)  
> at java.awt.Container.processEvent(Unknown Source)  
> at java.awt.Component.dispatchEventImpl(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)  
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)  
> at java.awt.Container.dispatchEventImpl(Unknown Source)  
> at java.awt.Window.dispatchEventImpl(Unknown Source)  
> at java.awt.Component.dispatchEvent(Unknown Source)  
> at java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
> at java.awt.EventQueue.access$500(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.awt.EventQueue$3.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.awt.EventQueue$4.run(Unknown Source)  
> at java.security.AccessController.doPrivileged(Native Method)  
> at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
> at java.awt.EventQueue.dispatchEvent(Unknown Source)  
> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
> at java.awt.EventDispatchThread.run(Unknown Source)  
> Caused by: java.lang.IllegalArgumentException: Invalid UUID string:  
> at java.util.UUID.fromString(Unknown Source)  
> at com.inductiveautomation.sfc.scripting.SfcScriptingFunctionsPyWrapper.cancelChart(SfcScriptingFunctionsPyWrapper.java:86)  
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
> at java.lang.reflect.Method.invoke(Unknown Source)  
> at org.python.core.PyReflectedFunction. **call** (PyReflectedFunction.java:186)  
> ... 49 more

> Ignition v7.9.3 (b2017060210)  
> Java: Oracle Corporation 1.8.0\_102

---

<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:** [July 18, 2017, 4:40pm UTC](https://forum.inductiveautomation.com/t/invalid-uuid-string/14818/2 "2017-07-18T16:40:10Z")

</div>

Where is `event.source.parent.msgChartID` coming from? The error is saying that it can’t cast whatever that field has into a valid UUID.

---

<div class="post-metadata">

**Author:** ![jreynolds](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jreynolds](https://forum.inductiveautomation.com/u/jreynolds)\
**Post date:** [July 18, 2017, 5:47pm UTC](https://forum.inductiveautomation.com/t/invalid-uuid-string/14818/3 "2017-07-18T17:47:00Z")

</div>

msgChartID is a custom String property on the root container.  
It gets populated from this client message:

> window = system.gui.getWindow(payload['windowPath'])   
> window.getRootContainer().msgValue1 = payload['msgValue1']  
> window.getRootContainer().msgState1 = payload['msgState1']  
> window.getRootContainer().msgValue2 = payload['msgValue2']  
> window.getRootContainer().msgChartID = payload['msgChartID']

The message is getting it's payload from the action block script in an SFC:

> system.util.sendMessage(project = chart.projectName,  
> messagehandler = "scannerHUD",  
> clientSessionID = chart.clientID,  
> payload = {"windowPath":chart.windowPath,"msgValue1":chart.message,  
> "msgState1":chart.state,"msgValue2":chart.message2,"msgChartID":chart.instanceId})
