Hello,
I am running into an issue where calling system.alarm.acknowledge() from a Perspective button click script consistently throws the following Jython exception, and the alarm is not acknowledged:
'''
(<type 'exceptions.TypeError'>, TypeError('cannot compare sets using cmp()',), <traceback object at 0x1abb>)
'''
The script is running in Perspective Session scope from a button click event.
'''
ALM_id = self.view.params.ALMId
user_name = self.session.props.auth.user.userName
if user_name is None or user_name == "":
user_name = "admin"
acked = self.view.custom.acked
if ALM_id is not None and ALM_id != "" and not acked:
note = "Acked"
logger.info("ALM_id: " + str(ALM_id))
logger.info("note: " + str(note))
logger.info("user_name: " + str(user_name))
result = system.alarm.acknowledge([str(ALM_id)], note, str(user_name))
logger.info("ack result: " + str(result))
'''
The logged values appear to be valid:
'''
ALM_id: a0053421-d665-41ef-ab97-5d6f29329a64
note: Acked
user_name: admin
'''
I have checked the following so far:
-
ALM_id is a valid alarm event UUID string.
-
note and user_name are plain strings.
-
The alarm ID is passed as a Python list: [str(ALM_id)].
-
I am not passing any Python set objects to system.alarm.acknowledge().
-
The same error occurs with multiple different alarm event IDs.
-
The tag / UDT security settings for Read and Write permissions are set to Public.
-
No custom roles or security zones are configured on the tag / UDT.
-
A separate warning also appears(However, there is currently no Alarm Journal profile configured on this Gateway, so I suspect this may be unrelated.):
'''
Unable to store event to any configured alarm journals - no journals configured.
''
My question is:
Is TypeError: cannot compare sets using cmp() a known issue in the Perspective / Gateway alarm acknowledgment pipeline?
Since the arguments passed to system.alarm.acknowledge() appear to be valid and correctly typed, I am wondering if this could be related to an internal comparison of role / permission sets, possibly around the Alarm Management permission or alarm acknowledgment security checks.
Are there any known workarounds, configuration settings to check, or Ignition versions where this behavior has been fixed?
Thank you.