# Bug in pyelasticsearch.py

**URL:** <https://discuss.elastic.co/t/bug-in-pyelasticsearch-py/3216>\
**Category:** Elasticsearch\
**Created:** [August 13, 2010, 2:43pm UTC](https://discuss.elastic.co/t/bug-in-pyelasticsearch-py/3216 "2010-08-13T14:43:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticsearcher](https://avatars.discourse-cdn.com/v4/letter/e/7ba0ec/32.png) [@elasticsearcher](https://discuss.elastic.co/u/elasticsearcher)\
**Post date:** [August 13, 2010, 2:43pm UTC](https://discuss.elastic.co/t/bug-in-pyelasticsearch-py/3216/1 "2010-08-13T14:43:35Z")

</div>

On line 193 (I believe), in function index() of pyelasticsearch.py, the python API for elasticsearch, there is a typo.

The line reads: "querystring\_args = {'opType':'create'}"  
But should read: "querystring\_args = {'op\_type':'create'}", as the parameter's name is 'op\_type', not 'opType'.

This, of course, will prevent python users from force-inserting, a problem I couldn't figure out why I was having... This seems to be the only problem I have discovered.

This may have been fixed already, but I thought I'd post it in case it hadn't.  
(I pulled pyelasticsearch.py down in version 0.8)

---

<div class="post-metadata">

**Author:** ![Robert\_Eanes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robert_eanes/32/3329_2.png) [@Robert\_Eanes](https://discuss.elastic.co/u/Robert_Eanes)\
**Post date:** [August 13, 2010, 8:43pm UTC](https://discuss.elastic.co/t/bug-in-pyelasticsearch-py/3216/2 "2010-08-13T20:43:15Z")

</div>

Thanks, I pushed the fix up to github.  
I do have to say though, that I haven't had a chance to update pyelasticsearch for a little while, there may be incompatibilities with the latest version of elasticsearch. Unfortunately the project I was going to use elasticsearch for didn't happen, so I haven't been tracking development closely.

On Aug 13, 2010, at 9:43 AM, elasticsearcher wrote:

> On line 193 (I believe), in function index() of pyelasticsearch.py, the  
> python API for elasticsearch, there is a typo.
> 
> The line reads: "querystring\_args = {'opType':'create'}"  
> But should read: "querystring\_args = {'op\_type':'create'}", as the  
> parameter's name is 'op\_type', not 'opType'.
> 
> This, of course, will prevent python users from force-inserting, a problem I  
> couldn't figure out why I was having... This seems to be the only problem I  
> have discovered.
> 
> ## This may have been fixed already, but I thought I'd post it in case it hadn't. (I pulled pyelasticsearch.py down in version 0.8)
> 
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/Bug-in-pyelasticsearch-py-tp1134050p1134050.html](http://elasticsearch-users.115913.n3.nabble.com/Bug-in-pyelasticsearch-py-tp1134050p1134050.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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, 4:20am UTC](https://discuss.elastic.co/t/bug-in-pyelasticsearch-py/3216/3 "2017-07-06T04:20:46Z")

</div>

Closed on July 6, 2017, 4:20am UTC


