zacra

Results 9 comments of zacra

ticker = yf.Ticker('AAPL') print(ticker.fast_info['market_cap'])

Full Code 👍 import yfinance as yf import pprint try: stock_code = 'AAPL' print(stock_code, " ..Start.. ") ticker = yf.Ticker(stock_code) stock_info2 = ticker.fast_info print("-------------------------\n") pprint.pprint(stock_info2) print("-------------------------\n") print(stock_info2['last_price']) print("-------------------------\n") print(stock_info2['market_cap']) print("-------------------------\n")...

Oh Sorry.. Error code is Traceback (most recent call last): File "/var/autobot/test_i.py", line 20, in print(stock_info2['market_cap']) File "/home/ec2-user/.local/lib/python3.7/site-packages/yfinance/base.py", line 110, in __getitem__ return getattr(self, k) File "/home/ec2-user/.local/lib/python3.7/site-packages/yfinance/base.py", line 402, in...

Python version is Python 3.7.16 sqlite3 version is 3.7.17

I solved it by upgrading the sqlite3 version. thank you!

> Hey I am able to run the yfinance API locally, but when I tried running it on Amazon MWAA Airflow I got the same error > > My local...

> @zacra Locally I'm able to update sqlite. Not sure how I will be able to update on AWS Airflow. Oh I use AWS EC2. I'm not sure how solves...