# Illegal\_argument\_exception on empty index

**URL:** <https://discuss.elastic.co/t/illegal-argument-exception-on-empty-index/278277>\
**Category:** Elasticsearch\
**Created:** [July 9, 2021, 11:38am UTC](https://discuss.elastic.co/t/illegal-argument-exception-on-empty-index/278277 "2021-07-09T11:38:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitalismaxim](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@vitalismaxim](https://discuss.elastic.co/u/vitalismaxim)\
**Post date:** [July 9, 2021, 11:38am UTC](https://discuss.elastic.co/t/illegal-argument-exception-on-empty-index/278277/1 "2021-07-09T11:38:36Z")

</div>

Hi,  
I'm trying to index some files to a new and empty index called 'envri' but on the first file I'm getting 'illegal\_argument\_exception' , 'mapper [spatialCoverage] cannot be changed from type [long] to [float]. I understand what the error means but I can't see why it is raised. All data was deleted with DELETE \_all and after checking the mapping with GET envri/\_mapping it clearly shows an empty mapping. There is the same issue when indexing the same files to a new (and therefore completely empty) index with a different name . It runs fine on one system but gives this error on the other.

 ![mapping](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d99acb486b0828a5dff63421e88a76e8b62e99b5.png)  
 ![error](https://us1.discourse-cdn.com/elastic/original/3X/7/6/764e2882c92529a72c31ee196f26f6c85db89ff4.png)

I'm using the Elasticsearch Python library.

Thanks!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 12, 2021, 8:38am UTC](https://discuss.elastic.co/t/illegal-argument-exception-on-empty-index/278277/2 "2021-07-12T08:38:19Z")

</div>

Please stop providing screenshots in favor of code snippets. They are hard to read for everyone and impossible to read for some. Thank you!

That said, the snippet you provided does not contain a delete but an index operation `es_index` in the screenshot, so it seems you are maybe doing something different than you intend to do.

---

<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:** [August 9, 2021, 8:38am UTC](https://discuss.elastic.co/t/illegal-argument-exception-on-empty-index/278277/3 "2021-08-09T08:38:38Z")

</div>

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