# Error of scripts

**URL:** <https://forum.inductiveautomation.com/t/error-of-scripts/9846>\
**Category:** Ignition\
**Created:** [March 27, 2015, 4:53am UTC](https://forum.inductiveautomation.com/t/error-of-scripts/9846 "2015-03-27T04:53:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janlly](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@janlly](https://forum.inductiveautomation.com/u/janlly)\
**Post date:** [March 27, 2015, 4:53am UTC](https://forum.inductiveautomation.com/t/error-of-scripts/9846/1 "2015-03-27T04:53:30Z")

</div>

in tag change script,i used script:

import system  
value = newValue.value  
system.tag.write(“rec\_tag”,value)  
system.gui.messageBox("This is new value: %d " % value)

but the script execute error, why?

error info:

[ERROR] 12:44:26 TagChangeScriptExecutor Error executing tag change script: scada\_test/change

Traceback (most recent call last):  
File “TagChangeScript:scada\_test/change”, line 4, in   
AttributeError: ‘com.inductiveautomation.ignition.common.script.Scr’ object has no attribute ‘gui’

at org.python.core.Py.AttributeError(Py.java:173)  
at org.python.core.PyObject.noAttributeError(PyObject.java:930)  
at org.python.core.PyObject. **getattr** (PyObject.java:925)  
at org.python.pycode.\_pyx66.f$0(TagChangeScript:scada\_test/change:4)  
at org.python.pycode.\_pyx66.call\_function(TagChangeScript:scada\_test/change)  
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:568)  
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:561)  
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:168)  
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:127)  
at com.inductiveautomation.ignition.common.util.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:99)  
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
at java.util.concurrent.FutureTask.run(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.lang.Thread.run(Unknown Source)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [March 27, 2015, 10:02am UTC](https://forum.inductiveautomation.com/t/error-of-scripts/9846/2 "2015-03-27T10:02:26Z")

</div>

Hi! Welcome to the forums!

Okay, the reason you’re getting this is because you’re running it as a Gateway Event Script. Gateway scripts don’t have any gui access.

Try moving it over to be a Client Event Script. 🙂
