I'm trying to retrieve data using the following RICs one by one, and for each result I need the indname = result.json()['GetInterdayTimeSeries_Response_5']['MetaFields']['NAME_LL'].
RIC = ['NLRSLY=ECI', 'DERSL=ECI', 'USRSL=ECI', 'AURSL=ECI', 'GBRSL=ECI', 'PLPMIY=ECI', 'ESRSLY=ECI', 'ITRSL=ECI', 'SGRSL=ECI', 'HKRSL=ECI', 'CHRSL=ECI', 'RURSLY=ECI', 'CARSLS=ECI', 'JPRSLS=ECI', 'BRRSL=ECI', 'NORSL=ECI', 'IERSL=ECI', 'SERSLM=ECI', 'CZRSLY=ECI', 'HURETY=ECI', 'IDRSLS=ECI', 'DKRSLY=ECI', 'MXRTSL=ECI', 'GRRSLY=ECI']
Every time I ran the for loop to get the result, it will return the following error which means the result.json()['GetInterdayTimeSeries_Response_5']['MetaFields']['NAME_LL'] is NONE for this RIC. But the RIC name that caused this error will change if I ran the loop again. And when I use the same code to just retrieve data from one single RIC which caused an error before, it will return the correct indname.
<ipython-input-3-012c1395d5cf> in get_trkd_quotes(token, appid, ric, interval, attempt)
63 response = result.json()['GetInterdayTimeSeries_Response_5']['Row']
64
---> 65 indname = result.json()['GetInterdayTimeSeries_Response_5']['MetaFields']['NAME_LL']
66
67 for dict in response:
TypeError: 'NoneType' object is not subscriptable
The api limitation is not exceeded since I was just requesting less than 10 records every time.
It seems this error cannot be reproduced because the RIC that causes error is changing randomly, what would be the cause of it?