# Script Module Tag Path

**URL:** <https://forum.inductiveautomation.com/t/script-module-tag-path/28735>\
**Category:** Ignition\
**Created:** [October 2, 2019, 12:19pm UTC](https://forum.inductiveautomation.com/t/script-module-tag-path/28735 "2019-10-02T12:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClemsonTim80](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@ClemsonTim80](https://forum.inductiveautomation.com/u/ClemsonTim80)\
**Post date:** [October 2, 2019, 12:19pm UTC](https://forum.inductiveautomation.com/t/script-module-tag-path/28735/1 "2019-10-02T12:19:06Z")

</div>

Moving quite a few script modules from 7.6/7.9 projects to 8.0. Under those versions the following line works fine:

system.tag.writeSynchronous("[]Mach" + str(machID) + “/MachineType”,machineType)

But under 8.0 throws

ValueError: Error writing to tag “Mach1/MachineType”: Error\_Configuration(“Tag provider ‘’ not found”)

Modifying to this modified tag path corrects the issue

system.tag.writeSynchronous("[default]Mach" + str(machID) + “/MachineType”,machineType)

Any workaround without a major search/replace and if not, will the code be backwards compatible ?

Thanks In Advance

---

<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:** [October 2, 2019, 4:13pm UTC](https://forum.inductiveautomation.com/t/script-module-tag-path/28735/2 "2019-10-02T16:13:26Z")

</div>

`[]` has never been a valid tag provider reference. That it worked was purely accidental. `[~]` is the correct syntax for “whatever the current project’s default tag provider is”, but will only work if you’re in a context that _has_ an idea of what project it’s in (basically, everything except for tag event scripts).

It’s unfortunate that this ever worked, but I don’t think there’s any way we could even handle this on upgrade. Imagine if you had a benign literal `"[]"` somewhere in your scripting, and we automatically changed it to `"[default]"` on upgrade - that would inevitably end up breaking something else.
