When downloading all sites in observations the resulting data is a list of sites.
M = metoffer.MetOffer(APIkey)
x = M.loc_observations(request = metoffer.ALL) # same as using 'all'
y = metoffer.Weather(x)
>> TypeError: list indices must be integers or slices, not str
This bit of code on the init method is failing because Location is a list of dictionaries.
returned_data["SiteRep"]["DV"]["Location"]["i"]
>> Error
returned_data["SiteRep"]["DV"]["Location"][0]["i"]
>> Works
When downloading all sites in observations the resulting data is a list of sites.
This bit of code on the init method is failing because
Locationis a list of dictionaries.