NameError: global name "" not defined

I believe this is the answer you are looking for:

1 Like

Because scope.

This is probably explained in the thread @justinedwards.jle linked, but to make things short here:
Tags do not belong to a project. They're on the gateway, which exposes them to your projects.

Since they're not part of a project, they don't have access to scripts defined in a project library... unless that project has been designated as the gateway Scripting Project.

So, you can either put the scripts your tags need access to in the Global Scripting Project, or use a gateway event tag change script instead. Since those belong to a project, they have access to the project library, and can be used to trigger scripts when tags change.


Gateway scripting project filled with the design project name solve the problem

Keep in mind that you only get one Gateway Scripting Project. In a multi-project gateway, take care to segregate all tag functionality from other projects.

1 Like