# "Global name 'world' is not defined" in Client Tag Change script

**URL:** <https://forum.inductiveautomation.com/t/global-name-world-is-not-defined-in-client-tag-change-script/25982>\
**Category:** Ignition\
**Created:** [June 20, 2019, 1:48pm UTC](https://forum.inductiveautomation.com/t/global-name-world-is-not-defined-in-client-tag-change-script/25982 "2019-06-20T13:48:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 20, 2019, 1:56pm UTC](https://forum.inductiveautomation.com/t/global-name-world-is-not-defined-in-client-tag-change-script/25982/2 "2019-06-20T13:56:06Z")

</div>

There is a scoping issue:

> [@Gateway Script global name not defined](http://forum.inductiveautomation.com/t/gateway-script-global-name-not-defined/14819/2):
>
> Yes. This is happening because there is a bug in Ignition with Gateway scripts. Gateways scripts still have the old legacy scoping enabled by default. The bug is this: variables defined in the outermost scope can not be see by functions. In this case you have the generateReportPart variable that holds a function and you try to execute it in the generateReport function. This is perfect legal Python – but as I said the error occurs because of the scoping bug in Gateway scripts. I wrote about…

---

_[View the full topic](https://forum.inductiveautomation.com/t/global-name-world-is-not-defined-in-client-tag-change-script/25982)._
