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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Error Message for some rics but not the others

Hi, I need to get historical data for a 1000 rics, I built a For loop to get the data one at a time for each Ric. However, I had some new issues. A lot of the rics not returning data. However if I search the rics in reuters, they do come up with data so they are valid rics. For example USD1MD=UBTA, USD1MD=HVBG return error messages in the codes below. Some rics do work well in the code below. For example USD1MD=LOYL, USD1MD=VBAH work well.

See my code below and error message below.

The ContributorRics ['1M'] includes the rics mentioned above and the ones shown in the error message below.

code:

---------------------------------------------------------------------------

ric_dict=dict()

for ric in ContributorRics['1M']:

try:

data_sr = ek.get_timeseries(ric,start_date='2021-02-01',end_date='2021-03-2',fields='CLOSE').squeeze()

data_sr = data_sr.drop_duplicates()

ric_dict[ric]=data_df

except:

print(ric)

print("Unexpected error:", sys.exc_info()[0])

continue

------------------------------------------------------------------------------------------


Below is the list of Rics that returns errors: USD1MD=UBTA, USD1MD=HVBG etc

USD1MD=BOGF Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=UBTA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=LBWX Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=HVBG Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=BERA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=NDEA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=DGZF Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=BILX Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=BUMZ Unexpected error: <class 'AttributeError'> USD1MD=FBIT Unexpected error: <class 'AttributeError'> USD1MD=BIIA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=SCNN Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=STKN Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=SCGH Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=SCCI Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=VIBD Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=SCGM Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=NXIP Unexpected error: <class 'AttributeError'> USD1MD=ALFT Unexpected error: <class 'AttributeError'> USD1MD=ACLB Unexpected error: <class 'eikon.eikonError.EikonError'> EUR1MD=BOGF Unexpected error: <class 'eikon.eikonError.EikonError'> EUR1MD=VBAH Unexpected error: <class 'eikon.eikonError.EikonError'> EUR1MD=KBCB Unexpected error: <class 'eikon.eikonError.EikonError'>
eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
Accepted
23k 22 9 14

Hello @anni.wang,

The error that you see may also differ between the versions of the library, the main goal of the Error report is to let you know that the content as requested is not be available or the syntax of the request is not correct. In this case- no available. The type of error can differ. "Logging on" option allows you to gain more insight into what the error is, which is especially important during development and design of an application, when you are identifying the correct content set and tuning your request:

  • I would remove, from your list, any invalid RICs. For example, EUR1MD=BILX is an invalid RIC.
  • Alternatively, you can also proceed by submitting multiple invalid RICs among the few valid ones, generating errors on them, and only preserving in ric_dict and further processing the RICs that have returned valid results. This is not efficient.

If you are looking to learn more of each specific invalid submission, I can think of two approaches:

  • A quick approach is entering the RIC into your Eikon/Refinitiv Workspace search bar. You will immediately see if the RIC is invalid.
  • The comprehensive approach is contacting Refinitiv Helpdesk Online -> I need help with content -> Eikon and have our content experts help you find the specific content that you require, or investigate why certain content is not available.
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
23k 22 9 14

Hello @anni.wang

I have run the following code on the excerpt on a sample of instrument from your list:

import sys
rics = ["USD1MD=LOYL", "USD1MD=VBAH","USD1MD=UBTA","USD1MD=LBWX"," USD1MD=HVBG","USD1MD=BERA","USD1MD=NDEA"]
ric_dict=dict()
for ric in rics:

    try:

        data_df = ek.get_timeseries(ric,start_date='2021-02-01',end_date='2021-03-2',fields='CLOSE').squeeze()
        data_df = data_df.drop_duplicates()        
        print(data_df)
        ric_dict[ric]=data_df

    except:

        print(ric)
        print("Unexpected error:", sys.exc_info()[0])
        continue

The result was:

On "Invalid RIC", my Eikon search result concurs with this result, i.e. when I search for "USD1MD=NDEA" I do not find this RIC.

The other two errors have resulted from this specific content not being available for the requested date range.

This looks to be (I am a developer) contributed US Dollar Deposit 1 month from different sources, so my guess is that some sources might not have provided this specific Deposit info for the requested date range.

However, for a definitive expert answer on why this content is not available, please contact Refinitiv Helpdesk Online -> Content -> Eikon directly.


invalidric.gif (56.0 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
1 0 0 0

Hi, I ran your code but I do not get the detailed description highlighted in pink above. How do I get the print out in the Pink Box to distinguish "invalid rics" or "data not available for requested date". Below is what I get when ran your code. The results are the same but I don't have the pink box with details.

Date 2021-02-01    0.08 Name: CLOSE, dtype: float64 Date 2021-02-01    0.28 Name: CLOSE, dtype: float64 USD1MD=UBTA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=LBWX Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=HVBG Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=BERA Unexpected error: <class 'eikon.eikonError.EikonError'> USD1MD=NDEA Unexpected error: <class 'eikon.eikonError.EikonError'>


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
1 0 0 0

Additionally, I try to print out the results in the dataframe. However, all data for all rics are the same, which is not the same in reality

Below is the additional code to print out the dataframe.

ric_df=pd.DataFrame(ric_dict)

ric_df

Below is a list of rics for your use.

USD1MD=RLBAUSD1MD=LOYLUSD1MD=BOGFUSD1MD=VBAHUSD1MD=UGBIUSD1MD=UBTAUSD1MD=SGMBUSD1MD=SGEPUSD1MD=SGBTUSD1MD=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D=CRIRGBP1MD=CNKZGBP1MD=CLHNGBP1MD=CICZGBP1MD=CALLGBP1MD=BTMLGBP1MD=BROMGBP1MD=BKTNGBP1MD=BKAUGBP1MD=BERAGBP1MD=BELBGBP1MD=BCPLGBP1MD=BCIAGBP1MD=BAYMGBP1MD=ABNAGBP1MD=CBJAGBP1MD=NDEAGBP1MD=DGZFGBP1MD=CMCPGBP1MD=BNPHGBP1MD=CALHGBP1MD=BILXGBP1MD=UNBEGBP1MD=RABAGBP1MD=IDBEGBP1MD=HDBKGBP1MD=EADBGBP1MD=BUMZGBP1MD=EFGUGBP1MD=VTBBGBP1MD=RZBKGBP1MD=RBUKGBP1MD=FBITGBP1MD=BIIAGBP1MD=SCNNGBP1MD=STKNGBP1MD=SCGHGBP1MD=SCCIGBP1MD=VPVNGBP1MD=VIBDGBP1MD=VABBGBP1MD=TCBVGBP1MD=SCGMGBP1MD=SGTUGBP1MD=SCBVGBP1MD=NXIPGBP1MD=NBKBGBP1MD=NBBBGBP1MD=MSBVGBP1MD=MBVNGBP1MD=MAIKGBP1MD=ICVNGBP1MD=HDBVGBP1MD=CTSGGBP1MD=BIDVGBP1MD=BBKBGBP1MD=BBFXGBP1MD=ALFTGBP1MD=ACLBGBP1MD=ACBAGBP1MD=ABUTGBP1MD=ABLE
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
23k 22 9 14

Hello @anni.wang,

This may have to do with a slightly older version of eikon library and perhaps Eikon (with Eikon proxy).

Try:

what do you see?

If the version is recent, try:

ek.set_log_level(0)

Before you make the calls.

Let us know if this helps?


ekversion.gif (4.5 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
23k 22 9 14

Hello @anni.wang,

Let me confirm:

You are printing the data frame data_df that is your call's result, when you receive a valid result (same as in the code)?

print(data_df) 
ric_dict[ric]=data_df

And only in this case you are storing the valid result into ric_dict for ric?

For me this approach works this way:


df1.gif (2.2 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
1 0 0 0

Hi, I set log level at 0 now and get the error details in pink box. However, I got more types of error message beyond "invalid rics" or "no data for requested date range":

1 NameError

2 Attribute Error

3 EUR1MD=BILX Unexpected error: <class 'eikon.eikonError.EikonError'>, which has no description.

What are NameError and Attribute Error? Why EUR1MD=BILX has no description?


EUR1MD=CALH Unexpected error: <class 'NameError'>


Error with EUR1MD=BILX: Invalid RIC EUR1MD=BILX: Invalid RIC | 


EUR1MD=BILX Unexpected error: <class 'eikon.eikonError.EikonError'> EUR1MD=UNBE Unexpected error: <class 'NameError'> EUR1MD=RABA Unexpected error: <class 'NameError'> EUR1MD=IDBE Unexpected error: <class 'NameError'> EUR1MD=HDBK Unexpected error: <class 'NameError'> EUR1MD=EADB Unexpected error: <class 'NameError'> EUR1MD=BUMZ Unexpected error: <class 'AttributeError'> EUR1MD=EFGU Unexpected error: <class 'NameError'> EUR1MD=VTBB Unexpected error: <class 'NameError'> EUR1MD=RZBK Unexpected error: <class 'NameError'> EUR1MD=RBUK Unexpected error: <class 'NameError'> EUR1MD=FBIT Unexpected error: <class 'AttributeError'>
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