API is not working cant get historical data

API is not working cant get historical data.

An exception occurred main ‘dict’ object has no attribute ‘set_index’

Because get_historical method not getting valid responce