# \[IGN-16691\]Gateway Event Script Compile Error

**URL:** <https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115>\
**Category:** Ignition\
**Created:** [June 23, 2026, 7:31pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115 "2026-06-23T19:31:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![lenny.toscano](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lenny.toscano](https://forum.inductiveautomation.com/u/lenny.toscano)\
**Post date:** [June 23, 2026, 7:31pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/1 "2026-06-23T19:31:32Z")

</div>

I'm not sure if I'm crazy or what but I'm running into a compile error when trying to save a script for a Gateway Event.

Crazy thing it I'm positive I was not getting this error running on 8.3.2. Then I upgraded to 8.3.7 and went into the script to add something and when I try to close & save I get a compile error.

The other crazy thing is that I don't think I should be getting a compile error because the error is complaining about indent and my indent looks fine to me.

Since the code is on the long side I tried just creating a short piece of code to see if is still a problem and it seems it is.

So here's the error:

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

And here's the test code:

```python
def onTagChange(initialChange, newValue, previousValue, event, executionCount):
	if initialChange == False:
		myPrinter = system.print.getDefaultPrinterName()

```

But if I change the code to the following it compiles just fine:

```python
def onTagChange(initialChange, newValue, previousValue, event, executionCount):
	if initialChange == False:
			myPrinter = system.print.getDefaultPrinterName()

```

To me it looks like there's an additional indent there for no reason. Anything after works fine.

Have I missed something/done something stupid, or did I discover a weird bug or something?

---

<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:** [June 23, 2026, 7:34pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/2 "2026-06-23T19:34:05Z")

</div>

@paul-griffith didn't you see this from a support rep the other day? Known bug? Any workaround?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 23, 2026, 9:22pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/3 "2026-06-23T21:22:30Z")

</div>

tl;dr: You're not doing anything wrong.

The easiest real workaround would be to put all your logic into the project library and just not have any indentation in the body _in the actual tag change script_.

Past that...you can just ignore it. It's unpleasant and scary, but if your code is written correctly it will still be executing and working fine. The "compilation" error is because of something we're doing wrong **in the validation mechanism**.

---

<div class="post-metadata">

**Author:** ![lenny.toscano](https://avatars.discourse-cdn.com/v4/letter/l/8e7dd6/32.png) [@lenny.toscano](https://forum.inductiveautomation.com/u/lenny.toscano)\
**Post date:** [June 23, 2026, 9:31pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/4 "2026-06-23T21:31:51Z")

</div>

Thank you Paul - I thought I was losing my mind there lol.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 6, 2026, 12:54pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/5 "2026-07-06T12:54:37Z")

</div>

I'm facing the same error after upgrading to 8.3.7

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

I've noticed that the issue is on the first indent/keyword. If you don't want to move your logic into libraries, another workaround is by adding triple-quoted string on first line.

```python
""""""

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/550550791dbd4ba2755391414ccec10365b26561.png)  
and it let you save. I hope it gets fixed soon.

---

<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:** [July 6, 2026, 12:56pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/6 "2026-07-06T12:56:16Z")

</div>

This popped up too late to get into 8.3.8, but a fix should land in 8.3.9.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 15, 2026, 4:10pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/7 "2026-07-15T16:10:10Z")

</div>

Confirmed that it persists in version 8.3.8

---

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [July 15, 2026, 5:17pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/8 "2026-07-15T17:17:38Z")

</div>

There should be a big red warning right next to the downloads making it clear this affects both versions. We only update once a year and picked 8.3.7 today — we can't sit on a known bug for a full year. I intentionally avoided 8.3.8 thinking I was playing it safe on a stable release. Just got off the phone with support and now I'm looking at a full uninstall and rolling back to at least 8.3.6.

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [July 23, 2026, 12:55pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/9 "2026-07-23T12:55:32Z")

</div>

I've confirmed your confirmation

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 27, 2026, 3:55pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/10 "2026-07-27T15:55:40Z")

</div>

This is fixed in 8.3.9, projected for release at the end of August.

---

<div class="post-metadata">

**Author:** ![m.pelagatti](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/m.pelagatti/32/68595_2.png) [@m.pelagatti](https://forum.inductiveautomation.com/u/m.pelagatti)\
**Post date:** [August 11, 2026, 6:58am UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/11 "2026-08-11T06:58:36Z")

</div>

Hi everyone,  
ignition 8.3.8

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

we are waiting for 8.3.9, so I think this error in the log is also due to the same problem. Correct?  
Thanks

---

<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:** [August 11, 2026, 12:23pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/12 "2026-08-11T12:23:03Z")

</div>

> [@m.pelagatti](#):
>
> also due to the same problem. Correct?

I don't think it's the same problem. The error mentioned by the OP is an annoyance, but not fatal. I've seen this error crop up from time to time on the forums. You may need to restart the gateway service.

---

<div class="post-metadata">

**Author:** ![m.pelagatti](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/m.pelagatti/32/68595_2.png) [@m.pelagatti](https://forum.inductiveautomation.com/u/m.pelagatti)\
**Post date:** [August 11, 2026, 12:40pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/13 "2026-08-11T12:40:20Z")

</div>

Yes, I actually restarted the gateway and the error disappeared.

During this error, the gateway events stopped working and it didn't intercept any tagChanges.  
I restarted and everything was fixed. I haven't fully figured out the cause, but I hope it doesn't happen often. In any case, this is the first time I've seen this error.

Thanks

---

<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:** [August 11, 2026, 12:42pm UTC](https://forum.inductiveautomation.com/t/ign-16691-gateway-event-script-compile-error/116115/14 "2026-08-11T12:42:05Z")

</div>

[Search results for 'error notifying listener about project update' - Inductive Automation Forum](https://forum.inductiveautomation.com/search?q=error%20notifying%20listener%20about%20project%20update)
