# Links to Global Script Library broken in 7.8.2

**URL:** <https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439>\
**Category:** Ignition\
**Created:** [March 30, 2016, 7:33pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439 "2016-03-30T19:33:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [March 30, 2016, 7:33pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/1 "2016-03-30T19:33:39Z")

</div>

Our Ignition projects have a global script library called [shared] which has many different scripts for various things. One of the more fundamental scripts is related to navigation of windows.

Everything has been working fine until this morning when I started getting errors along the lines of:

AttributeError: ‘com.inductiveautomation.ignition.common.script.Scr’ object has no attribute ‘gui’

Where ‘gui’ is a script in my library.

I cant think of anything that I have changed in the project to suddenly have these calls to scripts not working, except that i updated to Ignition version 7.8.2 yesterday from 7.8.2 beta2.

The way i am calling my scripts in the Component Scripting is:

```auto
shared.nav.swapTo()
```

which equates to:

[scriptLibraryName].[scriptName].[functionName]

Surely the way we call global scripts has not changed since the last revision? Any insight would be much appreciated, as this has effectively broken things all throughout the entire project.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 30, 2016, 8:15pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/2 "2016-03-30T20:15:15Z")

</div>

Every time I’ve seen that type of error its been a syntax error in the script. Have you opened the script to look for highlighted errors? Or imported it in the script playground to see any parse errors?

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [March 30, 2016, 8:35pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/3 "2016-03-30T20:35:24Z")

</div>

Also check that the shared module has been published. I have run into a few instances where I was looking at stuff in a shared module and then saved the project but that module never got published and the clients could no longer find it. If you open the designer, then click on file --\> Publish Selected Resources look to see if that module is on the left under “Unpublished Global Resources”. If it is then you just have to publish it and restart the client.

That might not be the problem but it’s burned me a couple of times already.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [March 30, 2016, 8:37pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/4 "2016-03-30T20:37:09Z")

</div>

I have a ticket open on this exact same issue and am working with Paolo on it.  
Temporary work around is to move the script to the project library.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [March 30, 2016, 8:49pm UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/5 "2016-03-30T20:49:06Z")

</div>

I don’t fully know what was the cause of the issue, but just for fun i tried publishing project AND global and it worked thereafter. EVEN though i had not modified anything in the script library, i was simply browsing it.

---

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [April 30, 2016, 4:08am UTC](https://forum.inductiveautomation.com/t/links-to-global-script-library-broken-in-7-8-2/11439/6 "2016-04-30T04:08:28Z")

</div>

I am encountering something similar with 7.8.2.  
It is intermittent, that’s for sure.

[code]ERROR [ActionAdapter-TagChangeScripts[MacLeanFogg]-thread-1] Error executing script for event:&nbsp;`itemStateChanged`  
on component:&nbsp;`toggle`.  
Traceback (most recent call last):  
File “event:itemStateChanged”, line 9, in   
File “”, line 7, in \_onDeselectedClosePopup  
AttributeError: ‘com.inductiveautomation.ignition.common.script.Scr’ object has no attribute ‘nav’

```
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._pyx59._onDeselectedClosePopup$1(<custom-function _onDeselectedClosePopup>:7)
at org.python.pycode._pyx59.call_function(<custom-function _onDeselectedClosePopup>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
at org.python.core.PyFunction. __call__ (PyFunction.java:327)
at org.python.core.PyMethod. __call__ (PyMethod.java:124)
at org.python.pycode._pyx27.f$0(<event:itemStateChanged>:9)
at org.python.pycode._pyx27.call_function(<event:itemStateChanged>)
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:623)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:168)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:265)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:55)
at com.sun.proxy.$Proxy24.itemStateChanged(Unknown Source)
at javax.swing.AbstractButton.fireItemStateChanged(AbstractButton.java:2050)
at javax.swing.AbstractButton$Handler.itemStateChanged(AbstractButton.java:2355)
at javax.swing.DefaultButtonModel.fireItemStateChanged(DefaultButtonModel.java:455)
at javax.swing.JToggleButton$ToggleButtonModel.setSelected(JToggleButton.java:272)
at javax.swing.AbstractButton.setSelected(AbstractButton.java:348)
at com.inductiveautomation.factorypmi.application.components.PMIToggleButton.setSelected(PMIToggleButton.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.python.core.PyBeanProperty._doset(PyBeanProperty.java:66)
at org.python.core.PyObject. __set__ (PyObject.java:3678)
at org.python.core.PyObject.object ___setattr__ (PyObject.java:3742)
at org.python.core.PyObject.object ___setattr__ (PyObject.java:3732)
at org.python.core.PyObject$object ___setattr___ exposer. __call__ (Unknown Source)
at org.python.core.PyObjectDerived. __setattr__ (PyObjectDerived.java:990)
at com.inductiveautomation.factorypmi.application.script.PyComponentWrapper. __setattr__ (PyComponentWrapper.java:169)
at org.python.pycode._pyx31._closeOwnerOnWindowChange$1(<custom-function _closeOwnerOnWindowChange>:8)
at org.python.pycode._pyx31.call_function(<custom-function _closeOwnerOnWindowChange>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:184)
at org.python.core.PyFunction. __call__ (PyFunction.java:350)
at org.python.core.PyMethod. __call__ (PyMethod.java:154)
at org.python.pycode._pyx9._executeOnWindowChangeCallbacks$3(<module:shared.nav>:26)
at org.python.pycode._pyx9.call_function(<module:shared.nav>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:120)
at org.python.core.PyFunction. __call__ (PyFunction.java:307)
at org.python.pycode._pyx9.onWindowChanged$8(<module:shared.nav>:53)
at org.python.pycode._pyx9.call_function(<module:shared.nav>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
at org.python.core.PyFunction. __call__ (PyFunction.java:317)
at org.python.pycode._pyx1.f$0(<TagChangeScript:MacLeanFogg/OnWindowChange>:11)
at org.python.pycode._pyx1.call_function(<TagChangeScript:MacLeanFogg/OnWindowChange>)
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:623)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:582)
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:187)
at com.inductiveautomation.ignition.common.script.TagChangeScriptExecutor$TagChangeExecutionCallback.execute(TagChangeScriptExecutor.java:134)
at com.inductiveautomation.ignition.common.util.SerialExecutionQueue$PollAndExecute.run(SerialExecutionQueue.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)[/code]
```
