# System.perspective.print Help

**URL:** <https://forum.inductiveautomation.com/t/system-perspective-print-help/47115>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [May 25, 2021, 10:22pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115 "2021-05-25T22:22:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 25, 2021, 10:22pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/1 "2021-05-25T22:22:38Z")

</div>

Can someone please help me understand print in Perspective? From the manual, [system.perspective.print - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.print), it states,

“_Sends print statements to the Script Console when in the Designer. When in a Session, sends print statements to the Output Console. This function makes scripting diagnostics easier._”

I think there is some issue with semantics on this. I refer to the script console under tools, where you can test or practice. From using system.perspective.print, it prints to the output console when in designer, and does nothing when in a session. Is the manual wrong? Is what I described how it works? Does system.perspective.print not work while in session?

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [May 25, 2021, 10:51pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/2 "2021-05-25T22:51:14Z")

</div>

Script:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f3803053b8132ce955f2c656f8d35e7e7fe8b3e9.png)

On Designer  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/4/546209c5d346159d4e62b411780d7319f5664d99.png)

On Session  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95767d46b814bfbae219bebcdff51c1d49513c63.png)

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 25, 2021, 11:55pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/3 "2021-05-25T23:55:43Z")

</div>

Thanks, didn’t even cross my mind to open the console for the browser.

I still don’t like the terminology they used in the manual.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [May 26, 2021, 11:17am UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/4 "2021-05-26T11:17:22Z")

</div>

Well that is the browser console. I don’t know what else they would call it.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 26, 2021, 2:00pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/5 "2021-05-26T14:00:56Z")

</div>

They didn’t call it the browser console. They referred to the script console, which isn’t correct and then the output console, which is only correct for when in designer.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 26, 2021, 3:36pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/6 "2021-05-26T15:36:42Z")

</div>

Yeah, the documentation is just wrong. We’ll get it fixed.

---

<div class="post-metadata">

**Author:** ![edward.fowler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/edward.fowler/32/24179_2.png) [@edward.fowler](https://forum.inductiveautomation.com/u/edward.fowler)\
**Post date:** [February 22, 2022, 5:01pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/7 "2022-02-22T17:01:44Z")

</div>

On this subject (dog piling, new issue):

- Nothing in the Designer Console
- Error message is the gateway logs

```auto
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 18, in valueChanged at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.getSession(AbstractScriptingFunctions.java:104) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnSession(AbstractScriptingFunctions.java:118) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnPage(AbstractScriptingFunctions.java:47) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.print(PerspectiveScriptingFunctions.java:512) at jdk.internal.reflect.GeneratedMethodAccessor195.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: No perspective session attached to this thread.

at org.python.core.Py.JavaError(Py.java:547)

at org.python.core.Py.JavaError(Py.java:538)

at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:192)

at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:541)

at org.python.core.PyObject. __call__ (PyObject.java:400)

at org.python.pycode._pyx199.valueChanged$1(:34)

at org.python.pycode._pyx199.call_function()

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:831)

at com.inductiveautomation.ignition.common.script.ScriptManager.runFunction(ScriptManager.java:813)

at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$FunctionInvokerImpl.run(TagScriptManagerImpl.java:533)

at com.inductiveautomation.ignition.gateway.tags.scripting.events.AbstractTagScript.invoke(AbstractTagScript.java:34)

at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$Task.invoke(TagScriptManagerImpl.java:482)

at com.inductiveautomation.ignition.gateway.tags.scripting.TagScriptManagerImpl$TagScriptDispatcher.run(TagScriptManagerImpl.java:445)

at com.inductiveautomation.ignition.common.execution.impl.BasicExecutionEngine$ThrowableCatchingRunnable.run(BasicExecutionEngine.java:539)

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.ScheduledThreadPoolExecutor$ScheduledFutureTask.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 java.base/java.lang.Thread.run(Unknown Source)

Caused by: org.python.core.PyException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: No perspective session attached to this thread.

... 25 common frames omitted

Caused by: java.lang.IllegalArgumentException: No perspective session attached to this thread.

at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.getSession(AbstractScriptingFunctions.java:104)

at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnSession(AbstractScriptingFunctions.java:118)

at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnPage(AbstractScriptingFunctions.java:47)

at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.print(PerspectiveScriptingFunctions.java:512)

at jdk.internal.reflect.GeneratedMethodAccessor195.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)

... 22 common frames omitted

```

---

<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:** [February 22, 2022, 5:17pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/8 "2022-02-22T17:17:45Z")

</div>

Seems obvious to me:

```auto
Caused by: java.lang.IllegalArgumentException: No perspective session attached to this thread.

```

You can’t use `system.perspective` outside Perspective events or transforms.

---

<div class="post-metadata">

**Author:** ![edward.fowler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/edward.fowler/32/24179_2.png) [@edward.fowler](https://forum.inductiveautomation.com/u/edward.fowler)\
**Post date:** [February 22, 2022, 5:23pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/9 "2022-02-22T17:23:14Z")

</div>

@pturmel , thanks, you’ve been doing this for ever so it is obvious.  
In my defense, the manual doesn’t say where is can/cannot be used, all it says is " This function is used in **Python Scripting.**", not about only in events and transforms.

---

<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:** [February 22, 2022, 5:30pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/10 "2022-02-22T17:30:43Z")

</div>

> [@edward.fowler](#):
>
> the manual doesn’t say where is can/cannot be used

[But it does, under Scope](https://docs.inductiveautomation.com/display/DOC80/system.perspective.print). "Perspective Session".

Every script function has a scope declared in its syntax documentation.

---

<div class="post-metadata">

**Author:** ![edward.fowler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/edward.fowler/32/24179_2.png) [@edward.fowler](https://forum.inductiveautomation.com/u/edward.fowler)\
**Post date:** [February 22, 2022, 5:43pm UTC](https://forum.inductiveautomation.com/t/system-perspective-print-help/47115/11 "2022-02-22T17:43:55Z")

</div>

@pturmel Ah, I stand corrected. I should read the fine print better. Thank you Phil
