atreadw1492 / yahoo_fin

Scrape stock price history from new (Spring 2017) Yahoo Finance layout
MIT License
285 stars 125 forks source link

get_balance_sheet doesn't return any data #96

Open MarioVeloso opened 1 year ago

MarioVeloso commented 1 year ago

A few functions stop working a few days ago such as get_balance_sheet or get_income_statement, but others till working like si.get_stats_valuation, si.get_quote_table or si.get_stats.

bs = si.get_balance_sheet(stock) print(bs) print(bs.index) income = si.get_incomestatement(stock) print("Income statement ") print(income)

Empty DataFrame Columns: [] Index: [] Index([], dtype='object') 503 5541 30 Traceback (most recent call last): File "/Users/marioveloso/PycharmProjects/watchlist/fundamentals.py", line 134, in income = si.get_income_statement(stock) File "/Users/marioveloso/anaconda3/envs/watchlist/lib/python3.8/site-packages/yahoo_fin/stock_info.py", line 422, in get_income_statement temp = json_info["incomeStatementHistory"]["incomeStatementHistory"] TypeError: string indices must be integers

Addi-jpg commented 1 year ago

I have the same issue, please fix quick!

Thisisnad commented 1 year ago

I'm also having issues with "get_company_info()" modulle. The error returned appears to be similar. Wondering if anyone have found any fix? :-)

appl_info = si.get_company_info("aapl")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "C:\OS_OOP_NK\Python\PY3.11_202212\Lib\site-packages\yahoo_fin\stock_info.py", line 1015, in get_company_info json_info = json_info["assetProfile"]


TypeError: string indices must be integers, not 'str'
checkmarkets commented 1 year ago

Got the same issue