Open alphaveneno opened 2 months ago
sample code: try: financials = yf(symbol) summary = financials.get_summary_data(reformat=True) print('summary is present:',summary is not None) stock_summary[the_date] = summary[symbol] with open(path+'summary/'+stock+'.json', mode='w',encoding='utf-8') as write_file: json.dump(stock_summary, write_file) print('summary data written') write_file.close() except (KeyError, ConnectionError, RuntimeError, Exception): print('unable to add to',symbol) finally: index += 1 print('index is:',index,'\n')
try: financials = yf(symbol) summary = financials.get_summary_data(reformat=True) print('summary is present:',summary is not None) stock_summary[the_date] = summary[symbol] with open(path+'summary/'+stock+'.json', mode='w',encoding='utf-8') as write_file: json.dump(stock_summary, write_file) print('summary data written') write_file.close() except (KeyError, ConnectionError, RuntimeError, Exception): print('unable to add to',symbol) finally: index += 1 print('index is:',index,'\n')
The line:
summary = financials.get_summary_data(reformat=True)
freezes the app if a delisted stock symbol is used in yf() to derive financials.
Adding or removing arguments (i.e; reformat=True , reformat=False) does not make any difference.
It does not kick-out an exception, just freezes
sample code:
try: financials = yf(symbol) summary = financials.get_summary_data(reformat=True) print('summary is present:',summary is not None) stock_summary[the_date] = summary[symbol] with open(path+'summary/'+stock+'.json', mode='w',encoding='utf-8') as write_file: json.dump(stock_summary, write_file) print('summary data written') write_file.close() except (KeyError, ConnectionError, RuntimeError, Exception): print('unable to add to',symbol) finally: index += 1 print('index is:',index,'\n')
The line:
summary = financials.get_summary_data(reformat=True)
freezes the app if a delisted stock symbol is used in yf() to derive financials.
Adding or removing arguments (i.e; reformat=True , reformat=False) does not make any difference.
It does not kick-out an exception, just freezes