# Perspective Copied project "pageId" Error message

**URL:** <https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [November 20, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133 "2023-11-20T15:21:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [November 20, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/1 "2023-11-20T15:21:29Z")

</div>

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](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76be9f23e2f14e2c40b631dbcde63c103c77fcae.png)

Here you are the Details:

```auto
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.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 20, 2023, 3:31pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/2 "2023-11-20T15:31:15Z")

</div>

- 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.

---

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [November 20, 2023, 3:51pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/3 "2023-11-20T15:51:39Z")

</div>

Hi,

there is no code.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17d400587897c91ff7725ee3cb57f928be67fdcf.png)

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

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [November 20, 2023, 4:04pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/4 "2023-11-20T16:04:24Z")

</div>

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

```auto
def onPageStartup(page):
    pass

```

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 20, 2023, 4:15pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/5 "2023-11-20T16:15:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [November 20, 2023, 4:20pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/6 "2023-11-20T16:20:31Z")

</div>

![Screenshot_20231120-101930-920](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b14b30b6145a9dd83af37c95a97d519105e65243.png)  
It's not empty; there is a tab in there.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 20, 2023, 4:25pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/7 "2023-11-20T16:25:24Z")

</div>

> [@justinedwards.jle](#):
>
> there is a tab in there.

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

---

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [November 20, 2023, 4:33pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/8 "2023-11-20T16:33:15Z")

</div>

Hi,

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

---

<div class="post-metadata">

**Author:** ![tecnoeletronic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tecnoeletronic/32/50975_2.png) [@tecnoeletronic](https://forum.inductiveautomation.com/u/tecnoeletronic)\
**Post date:** [November 20, 2023, 4:37pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/9 "2023-11-20T16:37:36Z")

</div>

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.

---

<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:** [November 20, 2023, 4:39pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/10 "2023-11-20T16:39:59Z")

</div>

> [@tecnoeletronic](#):
>
> report this potential bug

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

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [November 20, 2023, 4:44pm UTC](https://forum.inductiveautomation.com/t/perspective-copied-project-pageid-error-message/82133/11 "2023-11-20T16:44:55Z")

</div>

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.
