# ElasticSearch throwing 400 when deleting index on python

**URL:** <https://discuss.elastic.co/t/elasticsearch-throwing-400-when-deleting-index-on-python/136367>\
**Category:** Elasticsearch\
**Created:** [June 18, 2018, 8:21pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-400-when-deleting-index-on-python/136367 "2018-06-18T20:21:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilson\_Kao](https://avatars.discourse-cdn.com/v4/letter/w/f0a364/32.png) [@Wilson\_Kao](https://discuss.elastic.co/u/Wilson_Kao)\
**Post date:** [June 18, 2018, 8:21pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-400-when-deleting-index-on-python/136367/1 "2018-06-18T20:21:14Z")

</div>

I am getting a 400 error when trying to delete an index from elastic search using the python api

`res = es.indices.delete(index=index_name)`  
and we are getting this exception

`RequestError: TransportError(400, u'illegal_argument_exception')`

however when delete the index manually through postman, it works. its also worth noting we don't get this error everyday which is very odd. also just for note, this is a relatively big search index, not sure if that has to do with anything though (\>10gb). we have also checked that the index exists before getting this error.

I also have noticed other people getting a similar error but they have reasons attached to their responses, while mine doesn't.

thanks in advanced

---

<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 16, 2018, 8:21pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-400-when-deleting-index-on-python/136367/2 "2018-07-16T20:21:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
