Facing TypeError: unsupported operand type(s) for -: 'list' and 'frozenset' #1704
-
|
Was running elastalert with python3.13 elastalert 2.26, whihc was runnning fine for the longest time, i make a change to the code of one rule and suddenly it starts throwing out this error: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/striker/venv/lib/python3.13/site-packages/elastalert/elastalert.py", line 1976, in sys.exit(main(sys.argv[1:])) ~~~~^^^^^^^^^^^^^^ File "/home/striker/venv/lib/python3.13/site-packages/elastalert/elastalert.py", line 1965, in main client = ElastAlerter(args) File "/home/striker/venv/lib/python3.13/site-packages/elastalert/elastalert.py", line 137, in init self.rules = self.rules_loader.load(self.conf, self.args) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/home/striker/venv/lib/python3.13/site-packages/elastalert/loaders.py", line 180, in load rule = self.load_configuration(rule_file, conf, args) File "/home/striker/venv/lib/python3.13/site-packages/elastalert/loaders.py", line 247, in load_configuration self.load_modules(rule, args) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/home/striker/venv/lib/python3.13/site-packages/elastalert/loaders.py", line 509, in load_modules if reqs - frozenset(list(rule.keys())): ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TypeError: unsupported operand type(s) for -: 'list' and 'frozenset'` two changes were just added:
however after disabling the rule and running the rest, still faced this error......can someone explain what happened, no elastalert or python update was done by me. and this is running in a pyvenv. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
an update: the rule that I changed is being run in the same py venv in another terminal as well and it is working fine, i have restarted that elastalert as well. very strange behavior |
Beta Was this translation helpful? Give feedback.
-
|
I'm not clear on the situation. Based on your latest update, it sounds like it works fine in one terminal, but not in another? |
Beta Was this translation helpful? Give feedback.
figured it out, it was due to a change in a custom rule, where it was not showing up as the script was already running but once I restarted it, and tested all rules using elastalert-test-rule it clearly showed up