# floating error while executing "Clone an Existing	Dataless SEED File"

**URL:** https://discourse.obspy.org/t/floating-error-while-executing-clone-an-existing-dataless-seed-file/895
**Category:** Users Mailing List Archive
**Tags:** archive
**Created:** [May 16, 2020, 10:52am UTC](https://discourse.obspy.org/t/floating-error-while-executing-clone-an-existing-dataless-seed-file/895 "2020-05-16T10:52:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sanjay\_kumar](https://discourse.obspy.org/user_avatar/discourse.obspy.org/sanjay_kumar/32/260_2.png) [@sanjay\_kumar](https://discourse.obspy.org/u/sanjay_kumar)
#### Post date: [May 16, 2020, 10:52am UTC](https://discourse.obspy.org/t/floating-error-while-executing-clone-an-existing-dataless-seed-file/895/1 "2020-05-16T10:52:03Z")

</div>

Hi Obspy users,  
Getting following error,

Traceback (most recent call last):  
File “clonedataless.py”, line 38, in   
blk[58][i\*mult].sensitivity\_gain = 400.0  
TypeError: list indices must be integers or slices, not float

i tried to resolve the issue while changing the flating value but still error is same.  
i am using python3.7.

---

<div class="post-metadata">

### Author: ![megies](https://discourse.obspy.org/user_avatar/discourse.obspy.org/megies/32/9_2.png) [@megies](https://discourse.obspy.org/u/megies)
#### Post date: [May 22, 2020, 9:01am UTC](https://discourse.obspy.org/t/floating-error-while-executing-clone-an-existing-dataless-seed-file/895/2 "2020-05-22T09:01:33Z")

</div>

Your i\*mult likely is a float, but since you use it as an index, its  
supposed to be an integer. Older numpy was lenient about it. Newer numpy  
isn't.

Cast to int, whenever something computed on the fly is used to index  
lists/arrays/...

T
