Perspective Copied project "pageId" Error message

Hi,

I copied a perspective project. In the copied project, every time I open a view in the designer (whether it's an existing view or a new one), the following error message box appears:

image

Here you are the Details:

com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:onPageStartup>", line 2, in onPageStartup
AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'pageId'

	at org.python.core.Py.AttributeError(Py.java:178)
	at org.python.core.PyObject.noAttributeError(PyObject.java:965)
	at com.inductiveautomation.ignition.common.script.PyDelegateObject.noAttributeError(PyDelegateObject.java:316)
	at org.python.core.PyObject.__getattr__(PyObject.java:959)
	at org.python.pycode._pyx3791.onPageStartup$1(<function:onPageStartup>:2)
	at org.python.pycode._pyx3791.call_function(<function:onPageStartup>)
	at org.python.core.PyTableCode.call(PyTableCode.java:173)
	at org.python.core.PyBaseCode.call(PyBaseCode.java:306)
	at org.python.core.PyFunction.function___call__(PyFunction.java:474)
	at org.python.core.PyFunction.__call__(PyFunction.java:469)
	at org.python.core.PyFunction.__call__(PyFunction.java:464)
	at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:846)
	at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:828)
	at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runFunction(ProjectScriptLifecycle.java:832)
	at com.inductiveautomation.ignition.common.script.ScriptManager$ScriptFunctionImpl.invoke(ScriptManager.java:1009)
	at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$AutoRecompilingScriptFunction.invoke(ProjectScriptLifecycle.java:897)
	at com.inductiveautomation.perspective.gateway.script.ScriptFunctionHelper.invoke(ScriptFunctionHelper.java:158)
	at com.inductiveautomation.perspective.gateway.script.ScriptRunner.run(ScriptRunner.java:38)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at com.inductiveautomation.perspective.gateway.threading.BlockingWork$BlockingWorkRunnable.run(BlockingWork.java:58)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.python.core.PyException
Traceback (most recent call last):
  File "<function:onPageStartup>", line 2, in onPageStartup
AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'pageId'

	... 24 more

Ignition v8.1.30 (b2023071408)
Java: Azul Systems, Inc. 11.0.18

Ignition version 8.1.30.

  • Go to Project Browser > Session Events > Page Startup.
  • Have a look at line 2 and see if you can figure out what pageId it's looking for.

If you can't figure out the problem then paste the script here (using the </> code formatting button.

1 Like

Hi,

there is no code.

I'm pretty sure that it's a bug caused by the 'copy' action of the project.

What happens if you turn that into valid python? i.e.,

def onPageStartup(page):
    pass
1 Like

Tim,
I asked about empty functions in the startup scripts and they're OK. You can't delete the definitions but if there's nothing in there it isn't a problem.
The puzzle is why the script and pageId are mentioned in the error message.

Screenshot_20231120-101930-920
It's not empty; there is a tab in there.

1 Like

I was going to mention that but wasn't sure ...

Hi,

the "tab" on scripts happens in all projects that i have but only in copied one cause the problems.

Just to be clearer. This anomaly doesn't cause issues at runtime but only in the designer. The only problem is the annoyance of having to dismiss the error message. I just wanted to report this potential bug. Before writing to you, I have already run several tests, including inserting 'print "hello"' statements within ALL session event scripts.

You should report this to support. This forum, while it may be helpful qualifying a bug, is not formal support.

1 Like

It is a puzzle. But the screenshot shows that the designer is unhappy. Adding a pass or a print type(page) is a sanity check that may provide a clue. Sounds like it has been tested already.