The following code
annotations = system.historian.queryAnnotations(
paths=paths,
startDate=system.date.addHours(system.date.now(), -1),
endDate=system.date.now()
)
for anno in annotations.getResults():
# HOW TO READ THE INFORMATION?
logger.info(str(anno['source']))
logger.info(str(anno.source))
logger.info(str(anno.source()))
gives the error
TypeError: 'com.inductiveautomation.historian.common.model.data.AnnotationPoint' object is unsubscriptable
I would like to display the following information for each annotation:
- path
- start time
- end time
- type
- data
How can I do?