Hi,
I have a tag which is called “Umidità” and when I call the function system.tag.queryTagHistory on it to get its history and create a csv file with it the system return an empty dataset. It seems to me that the function doesn’t handle special characters well.
Is there a solution to this or I have to rename the tag (and deal with broken links, transfer all the old tag history on the new one etc)?
Thanks
Have you tested your script on a tag without such characters?
It works with every other tag that doesn’t contains a special char
try setting a “u” infront of the string to convert it to unicode
link so
system.tag.queryTagHistory(paths=[u"[default]Umidità"], startDate=...)
or use “.decode()” (default is utf-8)
"[default]Umidità".decode()
1 Like
Thank you, it worked.
1 Like