# Referencing a session prop from a script library?

**URL:** <https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314>\
**Category:** Ignition\
**Tags:** ignition80\
**Created:** [March 23, 2020, 1:32pm UTC](https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314 "2020-03-23T13:32:59Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Isaiah\_Clemons](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Isaiah\_Clemons](https://forum.inductiveautomation.com/u/Isaiah_Clemons)\
**Post date:** [December 19, 2024, 5:41pm UTC](https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314/21 "2024-12-19T17:41:26Z")

</div>

Question, I know this is a bit late, but I was wondering if this was broken already? I tried this line and it gave me this error:

```python
File "<function:valueChanged>", line 2, in valueChanged
NameError: global name 'session' is not defined
view=Overview@D, project-name=Project
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last):
File "<function:valueChanged>", line 2, in valueChanged
NameError: global name 'session' is not defined

```

---

<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:** [December 19, 2024, 6:20pm UTC](https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314/22 "2024-12-19T18:20:44Z")

</div>

There's no way you copied and pasted what I put above correctly if line 2, per your error message, is defining the `session` variable.

---

<div class="post-metadata">

**Author:** ![Isaiah\_Clemons](https://avatars.discourse-cdn.com/v4/letter/i/dc4da7/32.png) [@Isaiah\_Clemons](https://forum.inductiveautomation.com/u/Isaiah_Clemons)\
**Post date:** [December 19, 2024, 6:48pm UTC](https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314/23 "2024-12-19T18:48:42Z")

</div>

Hmmmmmm.... Its possible I copied the wrong error, but I found a work around, thank you for your help anyways!

[Previous page](https://forum.inductiveautomation.com/t/referencing-a-session-prop-from-a-script-library/33314.md?page=1)
