You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
POST /tester2/image?refresh=false [status:406 request:0.003s]
Traceback (most recent call last):
File "/home/diters/PycharmProjects/imageMatch/imageMatchServer.py", line 6, in <module>
ses.add_image('https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg/687px-Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg')
File "/usr/local/python3/lib/python3.6/site-packages/image_match/signature_database_base.py", line 203, in add_image
self.insert_single_record(rec, refresh_after=refresh_after)
File "/usr/local/python3/lib/python3.6/site-packages/image_match/elasticsearch_driver.py", line 88, in insert_single_record
self.es.index(index=self.index, doc_type=self.doc_type, body=rec, refresh=refresh_after)
File "/usr/local/python3/lib/python3.6/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/python3/lib/python3.6/site-packages/elasticsearch/client/__init__.py", line 279, in index
_make_path(index, doc_type, id), params=params, body=body)
File "/usr/local/python3/lib/python3.6/site-packages/elasticsearch/transport.py", line 329, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/usr/local/python3/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 109, in perform_request
self._raise_error(response.status, raw_data)
File "/usr/local/python3/lib/python3.6/site-packages/elasticsearch/connection/base.py", line 108, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.TransportError: <exception str() failed>
The text was updated successfully, but these errors were encountered:
Hi @DIT4FUN I came across this issue as well. The problem is resolved by requiring a newer version of the elasticsearch-py module. Do this by adding the following line in your requirements.txt file.
tldr; Elastic Search 6+ no longer assumes application/json so you have to upgrade the elasticsearch-py module you are using so it passes the correct headers to elastic search.
I am using a VMware Centos7 system,and install all software follow the guide doc!
and then i test the following code:
then i got this error!
The text was updated successfully, but these errors were encountered: