Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
7.97k stars 1.74k forks source link

elastalert test rule command error #3269

Closed 1998729 closed 1 year ago

1998729 commented 1 year ago

$ elastalert-test-rule frequency.yaml Traceback (most recent call last): File "/home/yuzongyang/python/env/elastalert/bin/elastalert-test-rule", line 33, in sys.exit(load_entry_point('elastalert==0.2.4', 'console_scripts', 'elastalert-test-rule')()) File "/home/yuzongyang/python/env/elastalert/bin/elastalert-test-rule", line 25, in importlib_load_entry_point return next(matches).load() File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/importlib_metadata-5.0.0-py3.6.egg/importlib_metadata/init.py", line 207, in load module = import_module(match.group('module')) File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 955, in _find_and_load_unlocked File "", line 665, in _load_unlocked File "", line 678, in exec_module File "", line 219, in _call_with_frames_removed File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/elastalert-0.2.4-py3.6.egg/elastalert/test_rule.py", line 15, in from elastalert.config import load_conf File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/elastalert-0.2.4-py3.6.egg/elastalert/config.py", line 9, in from . import loaders File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/elastalert-0.2.4-py3.6.egg/elastalert/loaders.py", line 9, in import jsonschema File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/jsonschema-4.16.0-py3.6.egg/jsonschema/init.py", line 13, in from jsonschema._format import FormatChecker File "/home/yuzongyang/python/env/elastalert/lib/python3.6/site-packages/jsonschema-4.16.0-py3.6.egg/jsonschema/_format.py", line 1 from future import annotations ^ SyntaxError: future feature annotations is not defined

1998729 commented 1 year ago

python upgrade 3.7 closed