stock_price_forecasting_hybrid_model icon indicating copy to clipboard operation
stock_price_forecasting_hybrid_model copied to clipboard

New issue about KeyError:'response'

Open 2023-FL opened this issue 2 years ago • 0 comments

Hi, could any one know how to resolve the issue of KyError about the parameter of 'response' in the command of "count_total_articles = count_total_articles +len(NYTimes_data["response"]["docs"][:])" please?

The follow is a full description of the error: KeyError Traceback (most recent call last) in () 4 with open(file_str) as data_file: 5 NYTimes_data = json.load(data_file) ----> 6 count_total_articles = count_total_articles + len(NYTimes_data["response"]["docs"][:]) #add article number 7 for i in range(len(NYTimes_data["response"]["docs"][:])): # search in every docs for type of material or section = in the list 8 try:

KeyError: 'response'

Best regards, Francis

2023-FL avatar Apr 25 '22 16:04 2023-FL