Why does this script fail? x is a list with 200 RICs and attributes contains 22 fields. It even fails with chunksize=1.
chunksize = 5 i=0 w,err=ek.get_data(x[i:i+chunksize], attributes, { 'SDate': 0, 'EDate': -5, 'FRQ': 'FY', 'Curn': 'EUR'}) with open('SAMPLE.csv', 'a') as f: w.to_csv(f, sep=';',decimal=',') for i in range (chunksize, len(x), chunksize): print(i) w,err=ek.get_data(x[i:i+chunksize], attributes, { 'SDate': 0, 'EDate': -5, 'FRQ': 'FY', 'Curn': 'EUR'}) with open('SAMPLE.csv', 'a') as f: w.to_csv(f, sep=';',decimal=',',header=False)
returns
5 10 15 20 Backend error. 400 Bad Request
Looking forward to your comments.