I am trying to extract historic yahoo finance data on Anaconda using Python 3.5 using the code below:
from pandas_datareader import data as pdr
import fix_yahoo_finance
data = pdr.get_data_yahoo("SPY", start="2017-01-01", end="2017-04-30")
data = pdr.get_data_yahoo(["SPY", "IWM"], start="2017-01-01", end="2017-04-30")
It was working up until a few days ago when it started giving me the below message:
File "C:\Users\tedy\AppData\Local\Continuum\Anaconda3\lib\site-packages\requests\adapters.py", line 497, in send
raise SSLError(e, request=request)
SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
Does anyone know what I can do to get it working again?
Try the following solutions:
https://stackoverflow.com/a/42334357
and
Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
Make sure you have everything installed correctly do use SSL on python 3.5.