This is the following simple line of code that I am trying to execute:
rdp.open_desktop_session(config["api_key"])
ek.set_app_key(config["api_key"])
session = rd.session.desktop.Definition(app_key=config["api_key"]).get_session()
session.open()
rd.session.set_default(session)
fields = [
"TR.ISIN",
"TR.FiAssetTypeDescription",
"TR.FiMoodysRating",
"TR.FiFitchsRating",
"TR.IssuerRating",
"TR.FiIssuerMoodysRating",
"TR.FiSeniorityTypeDescription",
"TR.FiMaturityDate",
]
bond_df = ek.get_data(["IT173395892="], fields)[0]
bond_df
And this is the error message I am receiving:
EikonError Traceback (most recent call last)
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:127, in send_json_request(entity, payload, debug)
126 else:
--> 127 _raise_for_status(response)
128 except httpx.TimeoutException as timeout_exception:
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:271, in _raise_for_status(response)
270 logger.error(u'Error code {} | {}'.format(response.status_code, error_msg))
--> 271 raise EikonError(response.status_code, error_msg)
EikonError: Error code 429 | Client Error: Too many requests, please try again later.
During handling of the above exception, another exception occurred:
EikonError Traceback (most recent call last)
Cell In[3], line 21
8 rd.session.set_default(session)
10 fields = [
11 "TR.ISIN",
12 "TR.FiAssetTypeDescription",
(...)
18 "TR.FiMaturityDate",
19 ]
---> 21 bond_df = ek.get_data(["IT173395892="], fields)[0]
23 bond_df
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\data_grid.py:190, in get_data(instruments, fields, parameters, field_name, raw_output, debug)
187 if _endpoint == DataGridAsync_UDF_endpoint:
188 payload = {'requests': [payload]}
--> 190 result = eikon.json_requests.send_json_request(_endpoint, payload, debug=debug)
192 if result.get('responses'):
193 result = result['responses'][0]
File c:\Users\jrodriguez159\AppData\Local\Programs\Python\Python311\Lib\site-packages\eikon\json_requests.py:134, in send_json_request(entity, payload, debug)
132 except EikonError as eikon_err:
133 logger.error(f"HTTP request failed: {type(eikon_err).__name__}-{eikon_err.message}")
--> 134 raise EikonError(eikon_err.code, eikon_err.message)
135 except httpx.ConnectTimeout as connect_timeout:
136 logger.debug(f'HTTP ConnectTimeout: {connect_timeout}')
EikonError: Error code 429 | Client Error: Too many requests, please try again later.
***Advised about Error code 429 but client said this was working earlier today. Thank you all.