runScript on expression tag produces Bad_Stale value

I am trying to use an expression tag to produce a random value every 30 seconds in Ignition 8.0.5 using a the runScript expression and a script called randomInt written in a global project. For some reason it is producing a Bad_Stale value and I can’t figure out why. Here is the global script.

import random

def randint(lower, upper):
return random.randint(lower, upper)

Here is my runScript expression:

runScript(“randomInt.randInt”, 0, 0, 160)

You say this is a global project. But is it the “Global Scripting Project” as identified in the gateway’s configuration?

yes it is.

Consider putting some logging statements in your randInt function that will show the values passed.

Also look in your gateway logs for syntax error reports for your script modules. You only get one of those per save.

Ok thanks. I will do that.