# 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:** 1\
**Showing post:** 2

<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)`

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-alarm-acknowledge-consistently-throws-typeerror-cannot-compare-sets-using-cmp-in-perspective-session/116813)._
