Edit UDT property with script

I’m trying to edit a nested UDT property from a script, in 8.1.9. I’m simply trying to enable this nested udt instance. Here is an example of what I’m trying to do.

path = '[myprovider]myfirstudt/mysecondudt'
parent_path = '[myprovider]myfirstudt'
config = system.tag.getConfiguration(path, False)
config[0]['enabled'] = True
system.tag.config(parent_path, config)

After I run my script, the nested UDT remains disabled, but the strange thing is when I run a script to retrieve it’s configuration, enabled is still set to True.

Thanks in advance.

Are you actually calling system.tag.config() as a function on line 5, or is that just a typo? I don’t believe config() is a valid tag function. I’m assuming that system.tag.configure() was intended instead, which functioned as expected for me in 8.1.4.

Thanks for the reply, it was a typo. I found the problem, I had a horrible bug in my actual code, I feel pretty embarrassed now.