Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent failure in 0.4 #330

Closed
mrocklin opened this issue May 16, 2017 · 9 comments
Closed

Recent failure in 0.4 #330

mrocklin opened this issue May 16, 2017 · 9 comments

Comments

@mrocklin
Copy link

I'm getting this failure in 0.4. This is triggered from the dask test suite here: https://travis-ci.org/dask/dask/jobs/232952363#L6744 . This seemed to work in the last version.

In [1]: import pandas_datareader
In [3]: df = pandas_datareader.data.DataReader('GOOG', 'yahoo', '2010-01-01', '2010-01-30')

---------------------------------------------------------------------------
RemoteDataError                           Traceback (most recent call last)
<ipython-input-3-2856acfc7895> in <module>()
----> 1 df = pandas_datareader.data.DataReader('GOOG', 'yahoo', '2010-01-01', '2010-01-30')

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/data.py in DataReader(name, data_source, start, end, retry_count, pause, session, access_key)
    115                                 adjust_price=False, chunksize=25,
    116                                 retry_count=retry_count, pause=pause,
--> 117                                 session=session).read()
    118 
    119     elif data_source == "yahoo-actions":

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/yahoo/daily.py in read(self)
     75     def read(self):
     76         """ read one data from specified URL """
---> 77         df = super(YahooDailyReader, self).read()
     78         if self.ret_index:
     79             df['Ret_Index'] = _calc_return_index(df['Adj Close'])

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/base.py in read(self)
    155         if isinstance(self.symbols, (compat.string_types, int)):
    156             df = self._read_one_data(self.url,
--> 157                                      params=self._get_params(self.symbols))
    158         # Or multiple symbols, (e.g., ['GOOG', 'AAPL', 'MSFT'])
    159         elif isinstance(self.symbols, DataFrame):

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/base.py in _read_one_data(self, url, params)
     72         """ read one data from specified URL """
     73         if self._format == 'string':
---> 74             out = self._read_url_as_StringIO(url, params=params)
     75         elif self._format == 'json':
     76             out = self._get_response(url, params=params).json()

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/base.py in _read_url_as_StringIO(self, url, params)
     83         Open url (and retry)
     84         """
---> 85         response = self._get_response(url, params=params)
     86         text = self._sanitize_response(response)
     87         out = StringIO()

/home/mrocklin/anaconda/lib/python3.6/site-packages/pandas_datareader/base.py in _get_response(self, url, params)
    118         if params is not None and len(params) > 0:
    119             url = url + "?" + urlencode(params)
--> 120         raise RemoteDataError('Unable to read URL: {0}'.format(url))
    121 
    122     def _read_lines(self, out):

RemoteDataError: Unable to read URL: http://ichart.finance.yahoo.com/table.csv?s=GOOG&a=0&b=1&c=2010&d=0&e=30&f=2010&g=d&ignore=.csv
@mrocklin
Copy link
Author

Someone just reported that ichart.finance.yahoo.com itself may actually be down. Sorry for the noise.

@bkcollection
Copy link

bkcollection commented May 17, 2017

@mrocklin I suspect many of yahoo apis were deprecated recently. I suspect this is another one. I reply heavily for yahoo data too.

@dcgithubaccount
Copy link

@mrocklin @bkcollection Does it mean that pandas datareader yahoo api will never work in future ? Sorry for stupid question.

@dcgithubaccount
Copy link

Hi All,

I just realised that yahoo is working for asian stocks listed in Australia and Japan but doesn't work for European or American stocks.

@bkcollection
Copy link

@dcgithubaccount it is unable to work for australia and asia countries as well. I just tested it. How you make it work?

@dcgithubaccount
Copy link

@bkcollection. You are right. When i checked today morning I had successful run for Australia , Japan but didn't run for Europe and USA so i assumed that Asian sites were working.

    >>> f = web.DataReader(4578, 'yahoo', start, end)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/data.py", line 94, in DataReader
    session=session).read()
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/yahoo/daily.py", line 77, in read
    df = super(YahooDailyReader, self).read()
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 173, in read
    df = self._read_one_data(self.url, params=self._get_params(self.symbols))
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 80, in _read_one_data
    out = self._read_url_as_StringIO(url, params=params)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 91, in _read_url_as_StringIO
    response = self._get_response(url, params=params)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 117, in _get_response
    raise RemoteDataError('Unable to read URL: {0}'.format(url))
pandas_datareader._utils.RemoteDataError: Unable to read URL: http://ichart.finance.yahoo.com/table.csv
>>> f = web.DataReader('CBA.AX', 'yahoo', start, end)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/data.py", line 94, in DataReader
    session=session).read()
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/yahoo/daily.py", line 77, in read
    df = super(YahooDailyReader, self).read()
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 173, in read
    df = self._read_one_data(self.url, params=self._get_params(self.symbols))
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 80, in _read_one_data
    out = self._read_url_as_StringIO(url, params=params)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 91, in _read_url_as_StringIO
    response = self._get_response(url, params=params)
  File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/pandas_datareader/base.py", line 117, in _get_response
    raise RemoteDataError('Unable to read URL: {0}'.format(url))

This is the data extracted yesterday at 5:30 PM GMT.

0,16-May-2017,CBA.AX,16-May-2017,0.00051,0.20243,0.00966,0.15582,0.17599,-0.03921,0.03382,-0.00553,0.00079,0.00601,82.62,82.9,82.29,82.61,82.61,2487000,69.5,13-Sep-2016,87.66,27-Apr-2017

@infinityanalytics
Copy link

infinityanalytics commented May 17, 2017

It's not down -- the URL changed and a token is now required. See the discussion and fix on the R side: joshuaulrich/quantmod#157

@rgkimball
Copy link
Contributor

See #315; we have some duplicate discussion going on here.

@jreback
Copy link
Contributor

jreback commented Jul 2, 2017

dupe of #315

@jreback jreback closed this as completed Jul 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants