ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
14.96k stars 2.45k forks source link

SSL: CERTIFICATE_VERIFY_FAILED on stock.info and stock.financials #393

Closed iatechicken closed 4 years ago

iatechicken commented 4 years ago
import yfinance as yf
msft = yf.Ticker("msft")
msft.info
msft.financials

so... most other functions are working... but info and financials are throwing SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076) error. I got lazy and stopped testing others after financials, but pretty much went down the list from info on your README.md

I might have missed something but overall it's not a major issue since I just use yf.download to get most of the info that I need. Thanks for the great stuff!

bala-v commented 4 years ago

I got this error after fixing lxml dependency error (which was fixed by pip install lxml). The second error I got was "SSL:CERTIFICATE_VERIFY_FAILED". I was able to over this issue based on StackOverflow comments for Mac machine to install certficates in Python - Screen Shot 2020-07-26 at 11 19 06 AM

iatechicken commented 4 years ago

thank you!

binfeng commented 4 years ago

https://stackoverflow.com/a/42107877