Not able to get data from API. This code was working fine till yesterday. Today getting following error - "ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check'))"
from uk_covid19 import Cov19API
import pandas as pd
ltla_filter = ['areaType=ltla']
cases_and_deaths = {
"areaType":"areaType"
,"areaName":"areaName"
,"areaCode":"areaCode"
,"specimenDate":"date"
,"dailyLabConfirmedCases":"newCasesBySpecimenDate"
,"totalLabConfirmedCases":"cumCasesBySpecimenDate"
}
api = Cov19API(filters=ltla_filter, structure=cases_and_deaths)
data = api.get_json() # Returns a dictionary
Not able to get data from API. This code was working fine till yesterday. Today getting following error - "ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check'))"