SystemError: Automatic proxy initialization should only occur on proxy classes when opening window

Using vision, Ignition 8.1.47.

Have a template that has a button on it to quickly acces a window related to the data the template is showing. Been working on this project for months, and just today started getting this -

Traceback (most recent call last):
  File "<event:mouseClicked>", line 1, in <module>
  File "<module:Stall.nav>", line 57, in openPump
SystemError: Automatic proxy initialization should only occur on proxy classes


Ignition v8.1.47 (b2025022612)
Java: Azul Systems, Inc. 17.0.13

Full -

Traceback (most recent call last):
  File "<event:mouseClicked>", line 1, in <module>
  File "<module:Stall.nav>", line 57, in openPump
SystemError: Automatic proxy initialization should only occur on proxy classes

	at org.python.core.Py.SystemError(Py.java:244)
	at org.python.core.PyObject.proxyInit(PyObject.java:180)
	at org.python.core.PyObject.getJavaProxy(PyObject.java:379)
	at org.python.core.Py.exceptionToString(Py.java:1471)
	at org.python.core.PyException.toString(PyException.java:113)
	at java.base/java.lang.Throwable.<init>(Unknown Source)
	at java.base/java.lang.Exception.<init>(Unknown Source)
	at com.inductiveautomation.ignition.common.script.JythonExecException.<init>(JythonExecException.java:22)
	at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:808)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:207)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:300)
	at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:57)
	at jdk.proxy2/jdk.proxy2.$Proxy48.visionWindowOpened(Unknown Source)
	at com.inductiveautomation.factorypmi.application.FPMIWindow.fireVisionWindowOpened(FPMIWindow.java:719)
	at com.inductiveautomation.factorypmi.application.VisionDesktop$RuntimeWindowOpener.openWindow(VisionDesktop.java:549)
	at com.inductiveautomation.factorypmi.application.VisionDesktop.openWindow(VisionDesktop.java:192)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.lambda$openWindowImpl$5(NavUtilities.java:393)
	at com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities.doGUIAction(WindowUtilities.java:851)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindowImpl(NavUtilities.java:336)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindow(NavUtilities.java:331)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilitiesDispatcher.openWindow(NavUtilitiesDispatcher.java:151)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction.__call__(ScriptManager.java:553)
	at org.python.core.PyObject.__call__(PyObject.java:477)
	at org.python.core.PyObject.__call__(PyObject.java:481)
	at org.python.pycode._pyx19.openPump$4(<module:Stall.nav>:58)
	at org.python.pycode._pyx19.call_function(<module:Stall.nav>)
	at org.python.core.PyTableCode.call(PyTableCode.java:173)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
	at org.python.core.PyFunction.__call__(PyFunction.java:416)
	at org.python.pycode._pyx18.f$0(<event:mouseClicked>:1)
	at org.python.pycode._pyx18.call_function(<event:mouseClicked>)
	at org.python.core.PyTableCode.call(PyTableCode.java:173)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1703)
	at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:804)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:207)
	at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:300)
	at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:57)
	at jdk.proxy2/jdk.proxy2.$Proxy49.mouseClicked(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Ignition v8.1.47 (b2025022612)
Java: Azul Systems, Inc. 17.0.13

The script that is being called

def openPump(event):
	"""
	Pump icon acts as a button to open the pump for that product and stall #
	Args:
		event: the button click
	Returns:
		None, opens up Pump Screen
	"""
	stall = event.source.parent.stall
	params = {"stall":stall}
	if stall == 1:
		window = system.nav.openWindow('O2PumpS1', params)
		system.nav.centerWindow(window)
	else:
		window = system.nav.openWindow('N2PumpS2', params)
		system.nav.centerWindow(window)

I have another location in the project with a button that calls also tries to open this window via

def openN2Pump(stall):
	window = system.nav.openWindow("N2PumpS2", {"stall":stall})
	system.nav.centerWindow(window)

called like

PrivilegedAccess.nav.openN2Pump(2)

And I get the same error leading me to believe it’s soemtihng with the window itself.

I am able to open the window in designer fine. I tried opening, saving the window with a tiny change, closed and re-opened the client, and still got the same issue.

Any ideas here? Is this window bonked and I need to import from a backup?

That window has a window open event script. Look there.

1 Like

Yup good call. It had a function that called 2 functions one of which I got rid of - but somehow when saving in my designer or more likely my own fault I forget to drop the now missing function. So I suppose it was erroring out on the visionWindowOpened part. Thanks you just saved me a lot of headache I did not know where to start with this one.

	at jdk.proxy2/jdk.proxy2.$Proxy48.visionWindowOpened(Unknown Source)
	at com.inductiveautomation.factorypmi.application.FPMIWindow.fireVisionWindowOpened(FPMIWindow.java:719)
	at com.inductiveautomation.factorypmi.application.VisionDesktop$RuntimeWindowOpener.openWindow(VisionDesktop.java:549)
	at com.inductiveautomation.factorypmi.application.VisionDesktop.openWindow(VisionDesktop.java:192)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.lambda$openWindowImpl$5(NavUtilities.java:393)
	at com.inductiveautomation.factorypmi.application.script.builtin.WindowUtilities.doGUIAction(WindowUtilities.java:851)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindowImpl(NavUtilities.java:336)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilities.openWindow(NavUtilities.java:331)
	at com.inductiveautomation.factorypmi.application.script.builtin.NavUtilitiesDispatcher.openWindow(NavUtilitiesDispatcher.java:151)

Is this what clued you in? Normally I just jump straight to the caused by which left me scratching my head.

1 Like

Yes. Which I looked for because the reported line numbers were meaningless for the code snips you posted.

1 Like