# System.alarm.acknowledge() consistently throws TypeError: cannot compare sets using cmp() in Perspective Session

**URL:** <https://forum.inductiveautomation.com/t/system-alarm-acknowledge-consistently-throws-typeerror-cannot-compare-sets-using-cmp-in-perspective-session/116813>\
**Category:** Ignition\
**Tags:** perspective, ignition83\
**Created:** [August 18, 2026, 5:48am UTC](https://forum.inductiveautomation.com/t/system-alarm-acknowledge-consistently-throws-typeerror-cannot-compare-sets-using-cmp-in-perspective-session/116813 "2026-08-18T05:48:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![m\_tanaka](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@m\_tanaka](https://forum.inductiveautomation.com/u/m_tanaka)\
**Post date:** [August 18, 2026, 5:48am UTC](https://forum.inductiveautomation.com/t/system-alarm-acknowledge-consistently-throws-typeerror-cannot-compare-sets-using-cmp-in-perspective-session/116813/1 "2026-08-18T05:48:29Z")

</div>

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:

```python
'''
(<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.

```python
'''
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:

```python
'''
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.):

```python
'''

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 18, 2026, 4:45pm UTC](https://forum.inductiveautomation.com/t/system-alarm-acknowledge-consistently-throws-typeerror-cannot-compare-sets-using-cmp-in-perspective-session/116813/2 "2026-08-18T16:45:32Z")

</div>

Your code formatting got mangled - see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

Is there any more detail in the stacktrace? An exact line number?

It's an internal error in Jython, in how Java Set objects are adapted into Python(ish) set objects. But none of the code you've posted should be causing it.

This _probably_ isn't relevant, but you could try changing this line:  
`logger.info("ack result: " + str(result))`  
To this:  
`logger.infof("ack result: %s", result)`
