# Runscript() not working after upgrading from 7.9 to 8

**URL:** <https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993>\
**Category:** Ignition\
**Created:** [April 10, 2019, 1:12pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993 "2019-04-10T13:12:03Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![fred.berryman](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fred.berryman](https://forum.inductiveautomation.com/u/fred.berryman)\
**Post date:** [April 10, 2019, 1:12pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/1 "2019-04-10T13:12:03Z")

</div>

As per the above. I have a series of expression tags that run shared scripts to return values. These worked fine before the upgrade to 8, but won’t work at all. I even created a new expression tag and script using this example from the help, and again can’t get it to work:

[https://docs.inductiveautomation.com/display/DOC80/runScript](https://docs.inductiveautomation.com/display/DOC80/runScript)

I’m sure it’s something obvious, but at the moment i’m stuck!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 10, 2019, 1:32pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/2 "2019-04-10T13:32:24Z")

</div>

What script are you trying to run?

---

<div class="post-metadata">

**Author:** ![fred.berryman](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fred.berryman](https://forum.inductiveautomation.com/u/fred.berryman)\
**Post date:** [April 10, 2019, 1:44pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/3 "2019-04-10T13:44:31Z")

</div>

Hi Kevin,

Thanks for the quick reply. None of my old shared scripts are working at the moment with runscript in an expression tag. To simplify, I followed the example in the (runscript) help. This doesn’t work either. I’m guessing it’s to do with the new inherited project architecture and probably me placing the script in the wrong place or something like that…

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1d226a2d80d538abbf3017b3c0bd75a65f7607dc.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/06452baca032ed764ed20a5c4155826d48f7e40f.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 10, 2019, 1:53pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/6 "2019-04-10T13:53:41Z")

</div>

Is the “Gateway Scripting Project” set to “global” or whatever the name of your parent project is under `Config > System > Gateway Settings` on the gateway?

---

<div class="post-metadata">

**Author:** ![fred.berryman](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fred.berryman](https://forum.inductiveautomation.com/u/fred.berryman)\
**Post date:** [April 10, 2019, 2:12pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/7 "2019-04-10T14:12:57Z")

</div>

Yes, and the “global” project is where the shared scripts were moved to on upgrade:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a817b3a6680bd330a64225e752f16133e468726d.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 10, 2019, 2:13pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/8 "2019-04-10T14:13:36Z")

</div>

It looks like you’re trying to create and reference the “Test” package in a child project, though, which won’t work.

---

<div class="post-metadata">

**Author:** ![fred.berryman](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fred.berryman](https://forum.inductiveautomation.com/u/fred.berryman)\
**Post date:** [April 10, 2019, 2:17pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/9 "2019-04-10T14:17:06Z")

</div>

Can I copy / move the scripts into the project I want to run them from? They don’t have to be “Global” as I only need to call them from one project. I’m just a little confused as they worked immediately before the upgrade and nothing was changed configuration - wise after upgrade.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 10, 2019, 2:19pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/10 "2019-04-10T14:19:35Z")

</div>

Tags don’t belong to a project, copying them isn’t going to do anything in this case. Any tag change script or expression runScript can only reference scripts defined in whatever the Gateway Scripting Project is.

I’m not sure it’s the same problem you’re seeing, but I am seeing some weird behavior where an expression tag with a runScript expression in it shows eval error on a fresh gateway start until I right-click -\> Restart Tag.

---

<div class="post-metadata">

**Author:** ![fred.berryman](https://avatars.discourse-cdn.com/v4/letter/f/3ab097/32.png) [@fred.berryman](https://forum.inductiveautomation.com/u/fred.berryman)\
**Post date:** [April 10, 2019, 2:52pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/11 "2019-04-10T14:52:06Z")

</div>

So I re-ran the ignition 8 installer and all seems to be well now. I guess something must’ve broken the first time round. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 19, 2019, 2:22pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/12 "2019-04-19T14:22:41Z")

</div>

Split this topic on April 19, 2019, 2:22pm UTC

A post was split to a new topic: [runScript on client tag stops working](https://forum.inductiveautomation.com/t/runscript-on-client-tag-stops-working/24255)

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 17, 2019, 3:07pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/13 "2019-10-17T15:07:47Z")

</div>

@Kevin.Herron, I think I encounter a similar issue:  
**Ignition 8.0.5**  
Gateway Scripting Project set to “global”  
I’ve create a new **tag expression** with a runscript.

```auto
runscript("shared.tag.alarm.test",0)

```

in the global project:

```auto
def shared.tag.alarm.test()
  import shared.tag.util
  return 0

```

Expression return :

```auto
[null, Error_ExpressionEval("Error executing script for runScript() expression:shared.tag.alarm.test"), Thu Oct 17 17:04:44 CEST 2019 (1571324684504)]

```

if I supprim the import, tag expression is OK:

```auto
def shared.tag.alarm.test()
  return 0

```

The same expression with the import inside the shared.tag.alarm.test, works with no issue in 7.9

---

<div class="post-metadata">

**Author:** ![michael.howe](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@michael.howe](https://forum.inductiveautomation.com/u/michael.howe)\
**Post date:** [August 26, 2022, 5:12pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/14 "2022-08-26T17:12:43Z")

</div>

Thanks! I had an alarm label runScript that worked on one gateway but not the other and I was trying to figure out where that final difference was, and Gateway Scripting Project was exactly what I needed to find!

---

<div class="post-metadata">

**Author:** ![PRASHANTH\_KAKKIRALA](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@PRASHANTH\_KAKKIRALA](https://forum.inductiveautomation.com/u/PRASHANTH_KAKKIRALA)\
**Post date:** [February 20, 2024, 5:21am UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/15 "2024-02-20T05:21:57Z")

</div>

This is an important config but not documented anywhere.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 20, 2024, 8:29am UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/16 "2024-02-20T08:29:38Z")

</div>

Sure it is.

> **[Gateway Settings | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/gateway/config/gateway-settings#gateway-settings)**
>
> Gateway Settings Property Reference

> **[Project Library | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/scripting/scripting-in-ignition/project-library#gateway-scripting-project)**
>
> Scripts under the Project Library are a project-based resource that allows user created Python scripts to be configured. Objects and functions created in a Project Library script can be called from anywhere in the project. Project Library scripts are...

---

<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 20, 2024, 1:32pm UTC](https://forum.inductiveautomation.com/t/runscript-not-working-after-upgrading-from-7-9-to-8/23993/17 "2024-02-20T13:32:33Z")

</div>

> [@PRASHANTH\_KAKKIRALA](#):
>
> an important config

Which is why, if you do an upgrade in place, or restore a gateway backup from 7.9 into 8.x, the upgrade process sets this configuration up properly for you.
