# Project Library scripts

**URL:** <https://forum.inductiveautomation.com/t/project-library-scripts/36099>\
**Category:** Maker\
**Created:** [June 26, 2020, 4:44pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099 "2020-06-26T16:44:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcarritt1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mcarritt1/32/4262_2.png) [@mcarritt1](https://forum.inductiveautomation.com/u/mcarritt1)\
**Post date:** [June 26, 2020, 4:44pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/1 "2020-06-26T16:44:26Z")

</div>

Maybe this a perspective thing, but I'm trying to call a project script from the script console (also tried a button in a view) and get the error below.

my function call:  
`project.test.scriptName()`

error:

> NameError: name 'project' is not defined

How do I call a project script?

If you can't in perspective, where should I put things that will be reused in lots of places?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [June 26, 2020, 4:48pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/2 "2020-06-26T16:48:45Z")

</div>

drop **project.** its no longer required in Ignition 8.

---

<div class="post-metadata">

**Author:** ![mcarritt1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mcarritt1/32/4262_2.png) [@mcarritt1](https://forum.inductiveautomation.com/u/mcarritt1)\
**Post date:** [June 26, 2020, 4:50pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/3 "2020-06-26T16:50:25Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![mcarritt1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mcarritt1/32/4262_2.png) [@mcarritt1](https://forum.inductiveautomation.com/u/mcarritt1)\
**Post date:** [July 4, 2020, 2:29pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/4 "2020-07-04T14:29:16Z")

</div>

Now I’m getting the same thing, but from a gateway script. I’ve copied the exact script that was running on a tag, to a gateway timer event. I have the correct project set under gateway settings for scripts.

my gateway script:  
`client = p1.srmCredentials.getClient()`

the error:

```auto
... line 2, in getInfo NameError: global name 'project' is not defined

```

The scripts: ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/d/adb3c64f413d3ed6912b3693a231bd30f3465035.png)

---

<div class="post-metadata">

**Author:** ![mcarritt1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mcarritt1/32/4262_2.png) [@mcarritt1](https://forum.inductiveautomation.com/u/mcarritt1)\
**Post date:** [July 4, 2020, 2:32pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/5 "2020-07-04T14:32:07Z")

</div>

Ah, well my gateway event script was inside of a function. When I took it out of the function and ran it it found the project scripts.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [November 1, 2024, 2:47pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/6 "2024-11-01T14:47:44Z")

</div>

Sorry for the thread revival, but after a search this is the closest match I've found so far.

I'm trying to debug a script. Vision 8.1.35, but was upgraded from 7.9.

I want to call a project script from the script console to test.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26fac63d09b24d1b6aa77e1edef1b9869c32b080.png)

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

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/9/593fef6e020a26c4847d5ae0718411755648cfa1.png)

Can I not see the wood for the trees here, it has been a long week...

---

<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 1, 2024, 2:56pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/7 "2024-11-01T14:56:23Z")

</div>

> [@Matrix\_Engineering](#):
>
> upgraded from 7.9.

Have you tried:

```python
project.ISEM_PG6.runReportAllSites(...)

```

Upgrades from v7.x put global scripts under the `shared.` package, and project scripts under the `project.` package.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [November 1, 2024, 2:57pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/8 "2024-11-01T14:57:14Z")

</div>

yes, it was at that originally, but then saw this thread and removed it. Let me try it back in because I think I might have had a case sensitivity issue too.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [November 1, 2024, 3:00pm UTC](https://forum.inductiveautomation.com/t/project-library-scripts/36099/9 "2024-11-01T15:00:29Z")

</div>

Thanks, a step further, it's now failing at line 132 in ISEM\_PG6, but at least it's calling it and telling me where.

Have a good weekend!
