Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elastalert-server is throwing syntax error while creating alert rules in praeco server #160

Open
suresh447 opened this issue Feb 19, 2020 · 1 comment

Comments

@suresh447
Copy link

Hi,

I am running elastalert-server by using this commands
cd ~/elastalert-server
vi config/config.json
npm install
npm run start

it is running fine but after creating rules in praeco server it is throwing error like below

07:40:43.779Z ERROR elastalert-server:
TestController: Failed to test rule with error: Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ctpadmin/elastalert/elastalert/test_rule.py", line 13, in
import mock
File "/home/ctpadmin/.local/lib/python3.5/site-packages/mock/init.py", line 7, in
import mock.mock as _mock
File "/home/ctpadmin/.local/lib/python3.5/site-packages/mock/mock.py", line 765
mock_name = f'{self._extract_mock_name()}.{name}'
^
SyntaxError: invalid syntax

Can any one please help me on this

@divyameharwade
Copy link

pip install mock==3.0.5 resolved the issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants