# Elasticsearch-py IndicesClient.analyze cannot handle unicode data

**URL:** <https://discuss.elastic.co/t/elasticsearch-py-indicesclient-analyze-cannot-handle-unicode-data/14693>\
**Category:** Elasticsearch\
**Created:** [December 4, 2013, 5:10am UTC](https://discuss.elastic.co/t/elasticsearch-py-indicesclient-analyze-cannot-handle-unicode-data/14693 "2013-12-04T05:10:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Kotlyarov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexey_kotlyarov/32/1386_2.png) [@Alexey\_Kotlyarov](https://discuss.elastic.co/u/Alexey_Kotlyarov)\
**Post date:** [December 4, 2013, 5:10am UTC](https://discuss.elastic.co/t/elasticsearch-py-indicesclient-analyze-cannot-handle-unicode-data/14693/1 "2013-12-04T05:10:57Z")

</div>

We've ran into a problem with the Python client: IndicesClient.analyze  
throws an exception with a unicode body. For example, this fails:

client.indices.analyze(body=u'привет')

Unicode in other places works fine; am I doing something wrong or is it  
okay to submit a patch?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/26b5b121-811a-452e-986d-a41be37e916b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26b5b121-811a-452e-986d-a41be37e916b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Honza\_Kral](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/honza_kral/32/876_2.png) [@Honza\_Kral](https://discuss.elastic.co/u/Honza_Kral)\
**Post date:** [December 4, 2013, 12:09pm UTC](https://discuss.elastic.co/t/elasticsearch-py-indicesclient-analyze-cannot-handle-unicode-data/14693/2 "2013-12-04T12:09:15Z")

</div>

Hi Alexey, this is indeed a bug, no need to submit a patch, fix is coming.

Thanks for catching this!

On Wed, Dec 4, 2013 at 6:10 AM, Alexey Kotlyarov [koterpillar@gmail.com](mailto:koterpillar@gmail.com)wrote:

> We've ran into a problem with the Python client: IndicesClient.analyze  
> throws an exception with a unicode body. For example, this fails:
> 
> client.indices.analyze(body=u'привет')
> 
> Unicode in other places works fine; am I doing something wrong or is it  
> okay to submit a patch?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/26b5b121-811a-452e-986d-a41be37e916b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/26b5b121-811a-452e-986d-a41be37e916b%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CABfdDirJ%2Bgt1aTUXjxvtsnKNFvpr7rsC9gJ3Vb3X6WNaFdH1mg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDirJ%2Bgt1aTUXjxvtsnKNFvpr7rsC9gJ3Vb3X6WNaFdH1mg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:03am UTC](https://discuss.elastic.co/t/elasticsearch-py-indicesclient-analyze-cannot-handle-unicode-data/14693/3 "2017-07-06T02:03:21Z")

</div>

Closed on July 6, 2017, 2:03am UTC


