# Python 2.6 compatibility with elasticsearch lib?

**URL:** <https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426>\
**Category:** Elasticsearch\
**Created:** [January 27, 2014, 5:12am UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426 "2014-01-27T05:12:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Stanford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_stanford/32/1647_2.png) [@John\_Stanford](https://discuss.elastic.co/u/John_Stanford)\
**Post date:** [January 27, 2014, 5:12am UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/1 "2014-01-27T05:12:35Z")

</div>

Hi,

Just wanted to check on the state of py26 compatibility for the  
elasticsearch python library. I only ask because I just got bit by the  
latest version of pyes after upgrading my dev lab to ES 0.90.10 and pyes  
0.90. FWIW, pyes appears to have used an incompatible encode call, though  
it works for py27. Any comment will not be taken as a statement of  
support; rather, a friendly timesaver while trying resolve my current  
dilemma... 🙂

Thanks,  
John

File  
"/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/managers.py"  
, line 412, in put\_mapping  
path = self.conn.\_make\_path(indices, doc\_type, "\_mapping")  
File  
"/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/es.py"  
, line 434, in \_make\_path  
return make\_path(','.join(indices), ','.join(doc\_types), \*components)  
File  
"/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py"  
, line 37, in make\_path  
path\_components = [quote(component) for component in path\_components ifcomponent  
]  
File  
"/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py"  
, line 17, in quote  
value = value.encode('utf8', errors='ignore') if isinstance(value, six.  
string\_types) else str(value)  
TypeError: encode() takes no keyword arguments

--  
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/499d4092-2073-433c-8f77-bc715fcdd690%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/499d4092-2073-433c-8f77-bc715fcdd690%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:** [January 27, 2014, 11:24am UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/2 "2014-01-27T11:24:58Z")

</div>

Hi John,

elasticsearch-py supports python 2.6, I don't develop for it but I run  
the tests under 2.6 and fix any bugs that occur. If you find any bugs,  
I will be happy to fix them.

Thanks

On Mon, Jan 27, 2014 at 6:12 AM, John Stanford [jxstanford@gmail.com](mailto:jxstanford@gmail.com) wrote:

> Hi,
> 
> Just wanted to check on the state of py26 compatibility for the  
> elasticsearch python library. I only ask because I just got bit by the  
> latest version of pyes after upgrading my dev lab to ES 0.90.10 and pyes  
> 0.90. FWIW, pyes appears to have used an incompatible encode call, though  
> it works for py27. Any comment will not be taken as a statement of support;  
> rather, a friendly timesaver while trying resolve my current dilemma... 🙂
> 
> Thanks,  
> John
> 
> File  
> "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/managers.py",  
> line 412, in put\_mapping  
> path = self.conn.\_make\_path(indices, doc\_type, "\_mapping")  
> File  
> "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/es.py",  
> line 434, in \_make\_path  
> return make\_path(','.join(indices), ','.join(doc\_types), \*components)  
> File  
> "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> line 37, in make\_path  
> path\_components = [quote(component) for component in path\_components if  
> component]  
> File  
> "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> line 17, in quote  
> value = value.encode('utf8', errors='ignore') if isinstance(value,  
> six.string\_types) else str(value)  
> TypeError: encode() takes no keyword arguments
> 
> --  
> 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/499d4092-2073-433c-8f77-bc715fcdd690%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/499d4092-2073-433c-8f77-bc715fcdd690%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/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%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:** ![Alberto\_Paro\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alberto_paro_2/32/1137_2.png) [@Alberto\_Paro\_2](https://discuss.elastic.co/u/Alberto_Paro_2)\
**Post date:** [January 27, 2014, 12:52pm UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/3 "2014-01-27T12:52:53Z")

</div>

We have already fixed this bug in master branch of pyes on GitHub. If you need I’ll release a new version on pypi.

Best regards,  
Alberto

On 27 Jan 2014, at 12:24, Honza Král [honza.kral@elasticsearch.com](mailto:honza.kral@elasticsearch.com) wrote:

> Hi John,
> 
> elasticsearch-py supports python 2.6, I don't develop for it but I run  
> the tests under 2.6 and fix any bugs that occur. If you find any bugs,  
> I will be happy to fix them.
> 
> Thanks
> 
> On Mon, Jan 27, 2014 at 6:12 AM, John Stanford [jxstanford@gmail.com](mailto:jxstanford@gmail.com) wrote:
> 
> > Hi,
> > 
> > Just wanted to check on the state of py26 compatibility for the  
> > elasticsearch python library. I only ask because I just got bit by the  
> > latest version of pyes after upgrading my dev lab to ES 0.90.10 and pyes  
> > 0.90. FWIW, pyes appears to have used an incompatible encode call, though  
> > it works for py27. Any comment will not be taken as a statement of support;  
> > rather, a friendly timesaver while trying resolve my current dilemma... 🙂
> > 
> > Thanks,  
> > John
> > 
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/managers.py",  
> > line 412, in put\_mapping  
> > path = self.conn.\_make\_path(indices, doc\_type, "\_mapping")  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/es.py",  
> > line 434, in \_make\_path  
> > return make\_path(','.join(indices), ','.join(doc\_types), \*components)  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > line 37, in make\_path  
> > path\_components = [quote(component) for component in path\_components if  
> > component]  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > line 17, in quote  
> > value = value.encode('utf8', errors='ignore') if isinstance(value,  
> > six.string\_types) else str(value)  
> > TypeError: encode() takes no keyword arguments
> > 
> > --  
> > 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/499d4092-2073-433c-8f77-bc715fcdd690%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/499d4092-2073-433c-8f77-bc715fcdd690%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/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.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/2C7F6EDE-48D0-4F7D-9C37-5855CA95EA92%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/2C7F6EDE-48D0-4F7D-9C37-5855CA95EA92%40gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![John\_Stanford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_stanford/32/1647_2.png) [@John\_Stanford](https://discuss.elastic.co/u/John_Stanford)\
**Post date:** [January 27, 2014, 3:06pm UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/4 "2014-01-27T15:06:41Z")

</div>

Thanks for the info, that is good to know.

John

[jxstanford@gmail.com](mailto:jxstanford@gmail.com)  
@jxstanford

On Jan 27, 2014, at 3:24 AM, Honza Král [honza.kral@elasticsearch.com](mailto:honza.kral@elasticsearch.com) wrote:

> Hi John,
> 
> elasticsearch-py supports python 2.6, I don't develop for it but I run  
> the tests under 2.6 and fix any bugs that occur. If you find any bugs,  
> I will be happy to fix them.
> 
> Thanks
> 
> On Mon, Jan 27, 2014 at 6:12 AM, John Stanford [jxstanford@gmail.com](mailto:jxstanford@gmail.com) wrote:
> 
> > Hi,
> > 
> > Just wanted to check on the state of py26 compatibility for the  
> > elasticsearch python library. I only ask because I just got bit by the  
> > latest version of pyes after upgrading my dev lab to ES 0.90.10 and pyes  
> > 0.90. FWIW, pyes appears to have used an incompatible encode call, though  
> > it works for py27. Any comment will not be taken as a statement of support;  
> > rather, a friendly timesaver while trying resolve my current dilemma... 🙂
> > 
> > Thanks,  
> > John
> > 
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/managers.py",  
> > line 412, in put\_mapping  
> > path = self.conn.\_make\_path(indices, doc\_type, "\_mapping")  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/es.py",  
> > line 434, in \_make\_path  
> > return make\_path(','.join(indices), ','.join(doc\_types), \*components)  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > line 37, in make\_path  
> > path\_components = [quote(component) for component in path\_components if  
> > component]  
> > File  
> > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > line 17, in quote  
> > value = value.encode('utf8', errors='ignore') if isinstance(value,  
> > six.string\_types) else str(value)  
> > TypeError: encode() takes no keyword arguments
> > 
> > --  
> > 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/499d4092-2073-433c-8f77-bc715fcdd690%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/499d4092-2073-433c-8f77-bc715fcdd690%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 a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/KxlPA\_GKlOM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/KxlPA_GKlOM/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%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:** ![John\_Stanford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_stanford/32/1647_2.png) [@John\_Stanford](https://discuss.elastic.co/u/John_Stanford)\
**Post date:** [January 27, 2014, 3:07pm UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/5 "2014-01-27T15:07:39Z")

</div>

Thanks Alberto, if you could cut a release, that would be great!

John

[jxstanford@gmail.com](mailto:jxstanford@gmail.com)  
@jxstanford

On Jan 27, 2014, at 4:52 AM, Alberto Paro [alberto.paro@gmail.com](mailto:alberto.paro@gmail.com) wrote:

> We have already fixed this bug in master branch of pyes on GitHub. If you need I’ll release a new version on pypi.
> 
> Best regards,  
> Alberto
> 
> On 27 Jan 2014, at 12:24, Honza Král [honza.kral@elasticsearch.com](mailto:honza.kral@elasticsearch.com) wrote:
> 
> > Hi John,
> > 
> > elasticsearch-py supports python 2.6, I don't develop for it but I run  
> > the tests under 2.6 and fix any bugs that occur. If you find any bugs,  
> > I will be happy to fix them.
> > 
> > Thanks
> > 
> > On Mon, Jan 27, 2014 at 6:12 AM, John Stanford [jxstanford@gmail.com](mailto:jxstanford@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > Just wanted to check on the state of py26 compatibility for the  
> > > elasticsearch python library. I only ask because I just got bit by the  
> > > latest version of pyes after upgrading my dev lab to ES 0.90.10 and pyes  
> > > 0.90. FWIW, pyes appears to have used an incompatible encode call, though  
> > > it works for py27. Any comment will not be taken as a statement of support;  
> > > rather, a friendly timesaver while trying resolve my current dilemma... 🙂
> > > 
> > > Thanks,  
> > > John
> > > 
> > > File  
> > > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/managers.py",  
> > > line 412, in put\_mapping  
> > > path = self.conn.\_make\_path(indices, doc\_type, "\_mapping")  
> > > File  
> > > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/es.py",  
> > > line 434, in \_make\_path  
> > > return make\_path(','.join(indices), ','.join(doc\_types), \*components)  
> > > File  
> > > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > > line 37, in make\_path  
> > > path\_components = [quote(component) for component in path\_components if  
> > > component]  
> > > File  
> > > "/Users/stanford/devel/solinea/goldstone/.tox/py26/lib/python2.6/site-packages/pyes/utils/ **init**.py",  
> > > line 17, in quote  
> > > value = value.encode('utf8', errors='ignore') if isinstance(value,  
> > > six.string\_types) else str(value)  
> > > TypeError: encode() takes no keyword arguments
> > > 
> > > --  
> > > 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/499d4092-2073-433c-8f77-bc715fcdd690%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/499d4092-2073-433c-8f77-bc715fcdd690%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/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CABfdDioKLkeXoknA%3DXFZbn85kf1P%3D-3L0nVJ9ekGUoXbXYWLpg%40mail.gmail.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 a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/KxlPA\_GKlOM/unsubscribe](https://groups.google.com/d/topic/elasticsearch/KxlPA_GKlOM/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/2C7F6EDE-48D0-4F7D-9C37-5855CA95EA92%40gmail.com](https://groups.google.com/d/msgid/elasticsearch/2C7F6EDE-48D0-4F7D-9C37-5855CA95EA92%40gmail.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, 1:54am UTC](https://discuss.elastic.co/t/python-2-6-compatibility-with-elasticsearch-lib/15426/6 "2017-07-06T01:54:34Z")

</div>


