Hi,
I don't know how you have made the whole script but the very last row in the error code tells me that you are making too many recursive calls to that same function.
By googling that Runtime Error I get the following message:
The “maximum recursion depth exceeded in comparison” error is raised when you try to execute a function that exceeds Python's built in recursion limit. You can fix this error by rewriting your program to use an iterative approach or by increasing the recursion limit in Python
Are you adding the same alarm to all of your tags at once? Try limiting the code to just add the alarm to a single tag and see if that solves the issue.
You will probably need to limit how many times you call the recursive function.