atreadw1492/yahoo_fin

requests_html error (not installed)

arline opened this issue · 1 comments

I'm writing a simple code to test yahoo_fin. The error claims requests_html is not installed but as you can see below, it is.
I've reinstalled python and all its libraries and still get this error. I find it strange that the error message claims requests_html but the library is requests-html. I tried installing with _ but it says "Requirement already satisfied".
I tried running the script regardless of this warning message but below code does not bring any data.
I'm using the command prompt and IDLE, the code I write in notepad++

code:
import yahoo_fin.stock_info as yf
ticker = 'nflx'
balance_sheet = yf.stock_info.get_balance_sheet(ticker)
print(balance_sheet)

error requests-html

Anyone know how I could fix it?
thank you!

Issue resolved in 2 steps

  1. import
    from requests_html import HTMLSession #line added
    from yahoo_fin import stock_info as yf

  2. "pip install lxml_html_clean"