Links to Global Script Library broken in 7.8.2

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:

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.

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?

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.

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.

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.

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: itemStateChanged
on component: 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]