# System.perspective.getSessionInfo()

**URL:** <https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149>\
**Category:** Ignition\
**Created:** [June 24, 2021, 9:30am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149 "2021-06-24T09:30:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tohhy-pm17](https://avatars.discourse-cdn.com/v4/letter/t/e19adc/32.png) [@tohhy-pm17](https://forum.inductiveautomation.com/u/tohhy-pm17)\
**Post date:** [June 24, 2021, 9:30am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/1 "2021-06-24T09:30:05Z")

</div>

Hi guys, as I know that Ignition gateway has a page called Perspective Sessions. May I know that it is possible to display all the data there in my project and display in a table format. From what I research I know that there is a script called ( System.perspective.getSessionInfo() ) can do it but I had try many times already it still cant work for me. May I know that anyone here have the example of these script.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 24, 2021, 10:20am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/2 "2021-06-24T10:20:02Z")

</div>

```python
	sessions = system.perspective.getSessionInfo()
	data = []
	for session in sessions:
		keys = session.keys()
		newRow = []
		for key in keys:
			newRow.append(str(session[key]))
		data.append(newRow)
	self.getSibling("Table").props.data = system.dataset.toDataSet(keys, data)

```

---

<div class="post-metadata">

**Author:** ![John\_S1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@John\_S1](https://forum.inductiveautomation.com/u/John_S1)\
**Post date:** [June 8, 2022, 10:33am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/3 "2022-06-08T10:33:41Z")

</div>

Can u please help me to get name , title and description from this syntax  
**system.perspective.getProjectInfo()**  
I tried the above methods , but couldn’t find.

For easy reference: [system.perspective.getProjectInfo - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.perspective.getProjectInfo)

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 8, 2022, 2:01pm UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/4 "2022-06-08T14:01:09Z")

</div>

```auto
projectInfo = system.perspective.getProjectInfo()

name = projectInfo['name']
title = projectInfo['title']
description = projectInfo['description']

```

---

<div class="post-metadata">

**Author:** ![John\_S1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@John\_S1](https://forum.inductiveautomation.com/u/John_S1)\
**Post date:** [June 10, 2022, 4:25am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/5 "2022-06-10T04:25:22Z")

</div>

I had tried this in the gateway scope and it is pushing the error, don’t know what I had done is wrong, the same script that you had gave even I tried. Anything specific that I need to check??

com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File “”, line 1, in at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.lambda$getProjectInfo$26(PerspectiveScriptingFunctions.java:853) at java.base/java.util.Optional.orElseThrow(Unknown Source) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.getProjectInfo(PerspectiveScriptingFunctions.java:853) at jdk.internal.reflect.GeneratedMethodAccessor95.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:446)

at org.python.core.PyObject. **call** (PyObject.java:450)

at org.python.pycode.\_pyx7.f$0(:6)

at org.python.pycode.\_pyx7.call\_function()

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

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:788)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:797)

at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:740)

at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:778)

at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:90)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.runAndReset(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.

… 22 common frames omitted

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

at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.lambda$getProjectInfo$26(PerspectiveScriptingFunctions.java:853)

at java.base/java.util.Optional.orElseThrow(Unknown Source)

at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.getProjectInfo(PerspectiveScriptingFunctions.java:853)

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

---

<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:** [June 10, 2022, 5:44am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/6 "2022-06-10T05:44:20Z")

</div>

Of course it will fail since the mentioned fucntion needs to be executed in the CS scope.  
Just put in a button or somewhere within the the client or session. Gateway is not the place for it!

---

<div class="post-metadata">

**Author:** ![John\_S1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@John\_S1](https://forum.inductiveautomation.com/u/John_S1)\
**Post date:** [June 10, 2022, 9:15am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/7 "2022-06-10T09:15:19Z")

</div>

Thanks, It worked, one more doubt Is there any way that I can get all the perspective project alone. I don’t want any vision project list.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 10, 2022, 11:50am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/8 "2022-06-10T11:50:53Z")

</div>

`system.perspective.getProjectInfo()` only returns info about perspective projects.

Also, it is available in the gateway scope, so I would expect it to execute just fine from a gateway script.

Perhaps @cmallonee can give a bit more information?

---

<div class="post-metadata">

**Author:** ![John\_S1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@John\_S1](https://forum.inductiveautomation.com/u/John_S1)\
**Post date:** [June 13, 2022, 3:21am UTC](https://forum.inductiveautomation.com/t/system-perspective-getsessioninfo/48149/9 "2022-06-13T03:21:02Z")

</div>

Thanks for the information, I tried that, its showing some errors. Can someone help me on this I want to get all perspective projects from the gateway(atleast project names.). Is there any way to do that?
