-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
TypeError: deprecated_search() got an unexpected keyword argument 'headers' #3151
Comments
The answer is written in 2725. Do not you understand? |
Sorry for disappointing you!
|
It was a problem if I put in a new version of python's elasticsearch library. The order of the arguments has changed from a certain version, but the correspondence is missing and it is a problem. However, in elastalert 0.2.4, the elasticsearch library of python is fixed at 7.0.0, so if you install it normally, this problem does not occur. all right? |
Yes 👍 I was able to cross check file test_rules.py based on a comment made by you in #2725 |
Sure, I will try after install it. Thank a ton! |
Ref: #2725
Getting the following error only when using rule type: Percentage Match
ERROR:root:Uncaught exception running rule test_perc: deprecated_search() got an unexpected keyword argument 'headers'
/cpt/elastalert $ python3 -m elastalert.elastalert --verbose --rule test_perc.yaml --config config.yaml
1 rules loaded
INFO:elastalert:Starting up
INFO:elastalert:Disabled rules are: []
INFO:elastalert:Sleeping for 59.999888 seconds
/home/node/.local/lib/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: Camel case format name dateOptionalTime is deprecated and will be removed in a future version. Use snake case name date_cptional_time instead.
warnings.warn(message, category=ElasticsearchWarning)
ERROR:root:Traceback (most recent call last):
File "/cpt/elastalert/elastalert/elastalert.py", line 1283, in handle_rule_execution
num_matches = self.run_rule(rule, endtime, rule.get('initial_starttime'))
File "/cpt/elastalert/elastalert/elastalert.py", line 902, in run_rule
if not self.run_query(rule, tmp_endtime, endtime):
File "/cpt/elastalert/elastalert/elastalert.py", line 636, in run_query
data = self.get_hits_aggregation(rule, start, end, index, rule.get('query_key', None))
File "/cpt/elastalert/elastalert/elastalert.py", line 569, in get_hits_aggregation
res = self.thread_data.current_es.deprecated_search(index=index, doc_type=rule.get('doc_type'),
File "/home/node/.local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 152, in _wrapped
return func(*args, params=params, headers=headers, **kwargs)
TypeError: deprecated_search() got an unexpected keyword argument 'headers'
The text was updated successfully, but these errors were encountered: