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
 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.