pmorissette / ffn

ffn - a financial function library for Python
pmorissette.github.io/ffn
MIT License
1.9k stars 284 forks source link

pandas_datareader._utils.RemoteDataError: Unable to read URL: #150

Closed ecorpnu closed 3 years ago

ecorpnu commented 3 years ago

I think yahoo has changed something and this throwing up the error. BUT if you cut the URL link, it actually works on the webpage, which means somehow data being throwback is not sitting pretty like before.

import ffn returns = ffn.get('aapl,msft,c,gs,ge', start='2010-01-01').to_returns().dropna() Traceback (most recent call last): File "", line 1, in File "C:\Python39\lib\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), kw) File "C:\Python39\lib\site-packages\ffn\utils.py", line 34, in _memoize cache[key] = result = func(args, kw) File "C:\Python39\lib\site-packages\ffn\data.py", line 76, in get data[ticker] = provider(ticker=t, field=f, mrefresh=mrefresh, kwargs) File "C:\Python39\lib\site-packages\decorator.py", line 232, in fun return caller(func, (extras + args), kw) File "C:\Python39\lib\site-packages\ffn\utils.py", line 34, in _memoize cache[key] = result = func(*args, *kw) File "C:\Python39\lib\site-packages\ffn\data.py", line 142, in yf tmp = pdata.get_data_yahoo(ticker, start=start, end=end) File "C:\Python39\lib\site-packages\pandas_datareader\data.py", line 86, in get_data_yahoo return YahooDailyReader(args, *kwargs).read() File "C:\Python39\lib\site-packages\pandas_datareader\base.py", line 253, in read df = self._read_one_data(self.url, params=self._get_params(self.symbols)) File "C:\Python39\lib\site-packages\pandas_datareader\yahoo\daily.py", line 153, in _read_one_data resp = self._get_response(url, params=params) File "C:\Python39\lib\site-packages\pandas_datareader\base.py", line 181, in _get_response raise RemoteDataError(msg) pandas_datareader._utils.RemoteDataError: Unable to read URL: https://finance.yahoo.com/quote/aapl/history?period1=1262278800&period2=1625507999&interval=1d&frequency=1d&filter=history Response Text: b'<!DOCTYPE html>\n \n \n \n Yahoo\n \n \n \n \n \n \n \n \n

\n \n \n \n
\n Yahoo Logo\n

Will be right back...

\n

Thank you for your patience.

\n

Our engineers are working quickly to resolve the issue.

\n
\n '

timkpaine commented 3 years ago

Dupe