drewdin
1
I have a list of tag paths
paths = ["path/to/tag/1", "path/to/tag/2", "path/to/tag/3", "path/to/tag/4"]
when i use todataSet to make a dataset i get an error
system.dataset.toDataSet(paths)
error:
TypeError: toDataSet(): 1st arg can’t be coerced to com.inductiveautomation.ignition.common.script.builtin.DatasetUtilities$PyDataSet
any suggestions? Thanks
nmudge
2
Yes, you need to specify the column names for the dataset.
Also, the function takes a list of lists, not a list of strings.
This works:
paths = [[path] for path in paths]
system.dataset.toDataSet(["tags"],paths)
More information here: support.inductiveautomation.com … ataset.htm
Best,
1 Like
drewdin
3
i called support and they informed me of that. I didn’t need the header info so i left it off thinking it was optional.
Thanks for the help