Elastalert: AttributeError: module 'jsonschema' has no attribute 'Draft7Validator'

Created on 9 Oct 2019  Â·  3Comments  Â·  Source: Yelp/elastalert

Hello,

got the following error during rule test as well as start of elastalert:

cloud@elk-stack-ubuntu-18:~/elastalert$ sudo python3 -m elastalert.test_rule --config /home/cloud/elastalert/config.yaml /home/cloud/elastalert/rules/job_errors.yaml
INFO:elastalert:Note: In debug mode, alerts will be logged to console but NOT actually sent.
To send them but remain verbose, use --verbose instead.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/cloud/elastalert/elastalert/test_rule.py", line 449, in
main()
File "/home/cloud/elastalert/elastalert/test_rule.py", line 445, in main
test_instance.run_rule_test()
File "/home/cloud/elastalert/elastalert/test_rule.py", line 412, in run_rule_test
conf = load_conf(args, defaults, overwrites)
File "/home/cloud/elastalert/elastalert/config.py", line 96, in load_conf
rules_loader = rules_loader_class(conf)
File "/home/cloud/elastalert/elastalert/loaders.py", line 93, in __init__
self.rule_schema = jsonschema.Draft7Validator(
AttributeError: module 'jsonschema' has no attribute 'Draft7Validator'

I have already tried to use a version >3.0.0 of jsonschema by modifing the setup.py, but it still isnt working.

Any other ideas?

Thanks a lot

Most helpful comment

Hi,

I had the same issue. Doing pip install --upgrade jsonschema worked for me, hope it'll work for you too.

Regards.

All 3 comments

Hi,

I had the same issue. Doing pip install --upgrade jsonschema worked for me, hope it'll work for you too.

Regards.

hi @Monpt7
that solved my problem - Elastalert is working now.
thanks a lot

In my case the error still occurs
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shortstack picture shortstack  Â·  3Comments

wjk1982 picture wjk1982  Â·  3Comments

shaohk picture shaohk  Â·  4Comments

tkumark picture tkumark  Â·  3Comments

PMDubuc picture PMDubuc  Â·  3Comments