Pretty simple:
events = system.alarm.queryStatus(state=[0,2,3])
events.getDataset()
Returns:
Traceback (most recent call last):
File "", line 3, in
AttributeError: 'java.util.Collections$UnmodifiableRandomAccessList' object has no attribute 'getDataset'
Am I missing something? The docs explicitly use this function , was it removed in 8.3?
It's a bug, slated to be fixed soon.
Workaround here:
This is a bug caused by some "under the hood" changes from 8.3. We're tracking it internally at a fairly high priority - it'll likely be fixed in 8.3.4 or shortly therafter.
In the meantime, you could try this as a workaround:
from com.inductiveautomation.ignition.common.alarming.query import AlarmQueryResultImpl
def datasetFromAlarms(alarms, historical=False):
inner = AlarmQueryResultImpl(historical) # pass True if using queryJournal
inner.extend(alarms)
return inner.dataset
alarms = …