lit26 / finvizfinance

Finviz analysis python library.
https://finvizfinance.readthedocs.io/en/latest/
MIT License
514 stars 85 forks source link

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? #96

Closed kahlijah closed 1 year ago

kahlijah commented 1 year ago

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 1 year ago

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 1 year ago

Thank you very much as always, Tianning!! Much appreciated!