QST: Hello Li - I'm getting an error 'An error occurred: 'NoneType' object has no attribute 'findAll' when running the script below. Is there an update to the library that can help me fix it please?
kahlijah opened this issue · 2 comments
kahlijah commented
Question about finvizfinance
#High level stock data
try:
foverview = Overview()
filters_dict = {'Country':'USA'}
foverview.set_filter(filters_dict=filters_dict)
df = foverview.screener_view()
df=df.rename(columns = {'Ticker\n\n':'Ticker'})
df['P/E'] = df['P/E'].apply(pd.to_numeric,errors='coerce')
df=df.rename(columns = {'Ticker':'symbol'})
except Exception as e:
print(f"An error occurred: {e}")
lit26 commented
I think you are using the older version. The latest version is 0.14.7. Can you check the version of the package? The latest bs4 switch findAll
to find_all
. The package also update this.
kahlijah commented
Thank you very much as always, Tianning!! Much appreciated!