Below is the stack trace I got when I ran the example rule.
C:\Windows\system32>python -m elastalert.elastalert --verbose --rule example_fre
quency.yaml
Traceback (most recent call last):
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\runpy.p
y", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\runpy.p
y", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\site-pa
ckages\elastalert-0.2.4-py3.6.egg\elastalert\elastalert.py", line 31, in <module
>
from .config import load_conf
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\site-pa
ckages\elastalert-0.2.4-py3.6.egg\elastalert\config.py", line 9, in <module>
from . import loaders
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\site-pa
ckages\elastalert-0.2.4-py3.6.egg\elastalert\loaders.py", line 9, in <module>
import jsonschema
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\site-pa
ckages\jsonschema-4.4.0-py3.6.egg\jsonschema\__init__.py", line 12, in <module>
from jsonschema._format import (
File "C:\Users\User.Name\AppData\Local\Programs\Python\Python36\lib\site-pa
ckages\jsonschema-4.4.0-py3.6.egg\jsonschema\_format.py", line 1
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
Steps I followed to setup ElastAlert is as below:
- git clone https://github.com/Yelp/elastalert.git
- pip install "setuptools>=11.3"
- python setup.py install But when I ran the example rule it is giving error. I am running this on WindowsServer 12 R2
Importing annotations from future (
from __future__ import annotations
) was added in python 3.7.You will need to either install a new version of Python or create a virtual environment with a new version of Python to get the code to run.