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

400 illegal_argument_exception #136

Open
betty-g opened this issue Jun 27, 2017 · 4 comments
Open

400 illegal_argument_exception #136

betty-g opened this issue Jun 27, 2017 · 4 comments

Comments

@betty-g
Copy link

betty-g commented Jun 27, 2017

Possibly this is related to issue #132? I'm getting the following messages when I try to run run.py:

2017-06-27 08:27:06 14989 annotator.elasticsearch [INFO] Creating index 'annotator'.
2017-06-27 08:27:06 14989 elasticsearch [WARNING] PUT /annotator/_mapping/annotation [status:400 request:0.010s]
Traceback (most recent call last):
File "run.py", line 114, in
main(sys.argv)
File "run.py", line 67, in main
annotation.Annotation.create_all()
File "/data/ckbooktest/edu/Store/annotator/elasticsearch.py", line 96, in create_all
body=mapping)
File "/data/ckbooktest/edu/Store/pyenv/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
return func(*args, params=params, **kwargs)
File "/data/ckbooktest/edu/Store/pyenv/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 289, in put_mapping
'_mapping', doc_type), params=params, body=body)
File "/data/ckbooktest/edu/Store/pyenv/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/data/ckbooktest/edu/Store/pyenv/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 93, in perform_request
self._raise_error(response.status, raw_data)
File "/data/ckbooktest/edu/Store/pyenv/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 105, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.RequestError: TransportError(400, u'illegal_argument_exception')

@betty-g
Copy link
Author

betty-g commented Jun 27, 2017

I think everything runs when I add a "ignore=400" to the conn.indices.put_mapping function, but I don't know if that caused any other problems.

@Caravaggio195
Copy link

how are you, have you solved at the end?

@arunman007
Copy link

I am getting the same problem at conn.indices.put_mapping(index=cls.es.index,
doc_type=cls.type,
body=mapping)

Did anyone find any solution?

@Caravaggio195
Copy link

No, I changed flask with Django in the project.

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

3 participants