For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
24 5 6 11

index error: too many indices for array

Hi,

ek.get_timeseries( ['BLX'], fields=['CLOSE'], interval = 'minute',start_date='2017-11-1T19:30', end_date='2017-11-1T19:35')

produces the error: *** IndexError: too many indices for array

It seems this is due to no data for 'BLX' in that period. But what's important is that the error causes the bulk request to throw exception (e.g. ek.get_timeseries( ['BLX','AA'], fields=['CLOSE'], interval = 'minute',start_date='2017-11-1T19:30', end_date='2017-11-1T19:35') ) which is not the case until this morning (2017-11-2T14:00 utc)

Can anyone explain?

Thanks

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonindex
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Hello @renee.yao,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Upvotes
Accepted
9.7k 49 38 60

Hi @renee.yao,

Since reporting this, I've attempted to run the get_timeseries() query again and observed expected behavior as documented. For example, if I request for the same data you are interested in where data is available, I get a response that looks like this:

When requesting for a timeframe where the data is not available, the get_timeseries() raises an exception as documented. For example:

The above output no longer provides the "too many indices for array" as we both initially observed but instead provides the expected output that "No data available...".


ahs.png (13.2 KiB)
ahs2.png (35.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
9.7k 49 38 60

Hi @renee.yao,

In general, these types of exceptions should not happen. I is likely an issue that needs to be resolved. I was able to replicate the issue.

As a test, I changed the end date by one minute and received some data.

I will raise the issue with the team.

thanks,


scripting.png (8.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea