Skip to content

conda env with python 3.6.1 fails import of data and wb for v0.2.1 #341

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

Closed
behudson opened this issue May 23, 2017 · 6 comments
Closed

conda env with python 3.6.1 fails import of data and wb for v0.2.1 #341

behudson opened this issue May 23, 2017 · 6 comments

Comments

@behudson
Copy link

$ python
Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.

from pandas_datareader import data, wb
Traceback (most recent call last):
File "", line 1, in
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/data.py", line 7, in
from pandas_datareader.google.daily import GoogleDailyReader
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/google/daily.py", line 1, in
from pandas_datareader.base import _DailyBaseReader
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/base.py", line 11, in
from pandas.core.common import PandasError, is_number
ImportError: cannot import name 'PandasError'

@WBare
Copy link

WBare commented May 23, 2017

Hi Brad,

Are you using pandas 0.20? If so, it looks like this is covered over here:
#304

@behudson
Copy link
Author

behudson commented May 24, 2017 via email

@WBare
Copy link

WBare commented May 24, 2017

Go to the conda website and search for pandas-datareader. The default is not up to date. Try this:
conda install -c conda-forge pandas-datareader=0.4.0

@behudson
Copy link
Author

Thanks for the tip to use conda-forge for this. Version 0.4.0 seems to work for Google, but not Yahoo.

pdr.data.DataReader('AAPL', 'google').head()
Open High Low Close Volume
Date
2010-01-04 30.49 30.64 30.34 30.57 123432050
2010-01-05 30.66 30.80 30.46 30.63 150476004
2010-01-06 30.63 30.75 30.11 30.14 138039594
2010-01-07 30.25 30.29 29.86 30.08 119282324
2010-01-08 30.04 30.29 29.87 30.28 111969081
pdr.data.DataReader('AAPL', 'yahoo').head()
Traceback (most recent call last):
File "", line 1, in
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/data.py", line 117, in DataReader
session=session).read()
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/yahoo/daily.py", line 77, in read
df = super(YahooDailyReader, self).read()
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/base.py", line 157, in read
params=self._get_params(self.symbols))
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/base.py", line 74, in _read_one_data
out = self._read_url_as_StringIO(url, params=params)
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/base.py", line 85, in _read_url_as_StringIO
response = self._get_response(url, params=params)
File "/home//miniconda2/envs/jp/lib/python3.6/site-packages/pandas_datareader/base.py", line 120, 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?s=AAPL&a=0&b=1&c=2010&d=4&e=26&f=2017&g=d&ignore=.csv

@WBare
Copy link

WBare commented May 26, 2017

yes, that is a different issue. Yahoo finance just recently shut town the service they were running. There is a way to adapt pandas-datareader to the new method, but I don't know if anyone is taking up that challenge. Check out the issues posted on datareader and you will see if posted a bunch of times.

@jreback
Copy link
Contributor

jreback commented Jul 2, 2017

closing as user issue.

@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

3 participants