Skip to content

Instantly share code, notes, and snippets.

@merrellb
Created March 11, 2011 21:17
Show Gist options
  • Save merrellb/866599 to your computer and use it in GitHub Desktop.
Save merrellb/866599 to your computer and use it in GitHub Desktop.
I am performing a query that generally works correctly but sometimes get the following:
File "/usr/local/lib/python2.6/dist-packages/pyes-0.15.0-py2.6.egg/pyes/es.py", line 735, in search
return self._query_call("_search", body, indexes, doc_types, **query_params)
File "/usr/local/lib/python2.6/dist-packages/pyes-0.15.0-py2.6.egg/pyes/es.py", line 248, in _query_call
response = self._send_request('GET', path, body, querystring_args)
File "/usr/local/lib/python2.6/dist-packages/pyes-0.15.0-py2.6.egg/pyes/es.py", line 218, in _send_request
raise pyes.exceptions.ElasticSearchException(response.body, response.status, response.body)
Contrary to the comments in this section of es.py the request looks successful however removing the exception handling reveals an underlying json error:
File "/usr/lib/python2.6/json/decoder.py", line 155, in JSONString
return scanstring(match.string, match.end(), encoding, strict)
ValueError: Invalid \uXXXX escape: line 1 column 28831 (char 28831)
How can I be getting back responses that contain invalid escape sequences (I used pyes to index the data as well)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment