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

ImmediateDeprecationError raise when trying to get data from yahoo #507

Closed
panfeng-espressif opened this issue Mar 18, 2018 · 27 comments
Closed

Comments

@panfeng-espressif
Copy link

panfeng-espressif commented Mar 18, 2018

Hello,

I am quite confused about the new module pandas_datareader.
As I learn from the website, pandas.io is changed to this new module. But there occurs a new issue, and I cannot find the same issue that anyone has ever met.
Would you please give me some advice on how to get data correctly by pandas_datareader module?

import pandas as pd
import datetime
import pandas_datareader.data as web
start = datetime.datetime(2010,1,1)
end = datetime.datetime(2015,1,1)
df = web.DataReader('XOM','yahoo',start,end)
Traceback (most recent call last):
File "", line 1, in
File "D:\program file\python27\lib\site-packages\pandas_datareader\data.py", l
ine 291, in DataReader
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Daily'))
pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Daily has been immediately deprecated due to large breaks in the API witho
ut the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

See https://github.com/pydata/pandas-datareader/issues

@gmaso
Copy link

gmaso commented Mar 18, 2018

same problem:

ImmediateDeprecationError: 
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

@bashtage
Copy link
Contributor

bashtage commented Mar 18, 2018 via email

@paintdog
Copy link

When will be 0.7 released??? Will this fix the issue?

@jingsupo
Copy link

I get data by this way:

wx20180320-042729

@paintdog
Copy link

Thank you very much - I will test it tomorrow and I will run my usual tests...

pdr.get_data_yahoo("DAI.DE")
Open High Low Close Adj Close Volume
Date
2010-01-04 37.240002 37.595001 36.959999 37.549999 27.826933 3673833
2010-01-05 37.500000 37.560001 36.869999 37.240002 27.597206 3897480
2010-01-06 37.189999 37.330002 36.619999 37.250000 27.604614 3615525

@Xinye3
Copy link

Xinye3 commented Mar 20, 2018

@jingsupo Hi jingsupo! I tried your method, it still indicated 'Yahoo Actions has been immediately deprecated...'. My pandas-datareader==0.6.0, do I need to update it? Really need such data, hope you can help me. Thanks.

@panfeng-espressif
Copy link
Author

@jingsupo That is quite strange. I have also tried your method, but still get error response.
When I try to get data from other company, for example google, there will be no error but timeout. Maybe this timeout is due to GFW, I don't care about it.
It seems only yahoo will cause this error

@jingsupo
Copy link

jingsupo commented Mar 20, 2018

@Xinye3 Hi Xinye3! I just tested it, and it's still successful.

In [1]: import pandas_datareader as pdr

In [2]: import datetime

In [3]: start = datetime.datetime(2018,1,1)

In [4]: end = datetime.date.today()

In [5]: baba = pdr.get_data_yahoo('BABA', start, end)

In [6]: baba
Out[6]:
          date        high         low        open       close    volume  \
0   2018-03-19  198.429993  192.800995  198.000000  194.529999  19481200
1   2018-03-16  200.380005  197.259995  198.399994  200.279999  26948700
2   2018-03-15  201.500000  196.520004  198.440002  199.059998  33504600
3   2018-03-14  193.630005  190.220001  190.289993  192.559998  20032300
4   2018-03-13  194.250000  187.389999  193.880005  188.410004  14826700
5   2018-03-12  194.399994  190.899994  192.300003  192.740005  17826200
6   2018-03-09  190.699997  188.009995  189.639999  190.550003  14208400
7   2018-03-08  190.229996  186.570007  189.050003  187.179993  14331400
8   2018-03-07  189.070007  184.320007  184.369995  189.050003  13728900
9   2018-03-06  188.009995  184.820007  185.190002  187.369995  17856100
10  2018-03-05  181.949997  177.070007  179.410004  181.600006  15656700

My pdr version is:
In [10]: pdr.__version__ Out[10]: '0.6.0+4.g0debb02'

@jingsupo
Copy link

jingsupo commented Mar 20, 2018

@panfeng-espressif 也许吧,我是开了VPN的,哈哈

但是我刚刚把VPN关了测试了一下,依然可以成功从yahoo获取数据,但无法从google获取数据。

@Xinye3
Copy link

Xinye3 commented Mar 20, 2018

@jingsupo Hi jingsupo, It's still wrong! maybe I was in the another planet. I will try to use VPN.

@LucasMarchand
Copy link

Same problem

error_datayahoo

@Raghavbi
Copy link

Same problem...
raceback (most recent call last):
File "<pyshell#16>", line 1, in
tsla=pdr.get_data_yahoo('TSLA', start, end)
File "C:\Python36\lib\site-packages\pandas_datareader\data.py", line 63, in get_data_yahoo
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Actions'))
pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

See https://github.com/pydata/pandas-datareader/issues

@Seaseemy
Copy link

image

@bashtage
Copy link
Contributor

I recommend reading the message in the deprecation. It explains why yahoo doesn't work in 0.6 or earlier.

@panfeng-espressif
Copy link
Author

@bashtage So how to get data correctly by pandas_datareader module?

@bashtage
Copy link
Contributor

bashtage commented Mar 22, 2018 via email

@jingsupo
Copy link

Install latest development version
$ pip install git+https://github.com/pydata/pandas-datareader.git

@PeterXiaoGuo
Copy link

still don't work... who could offer a solution to get yahoo finance data?

@SutharMukesh
Copy link

I got a solution by using this package
https://pypi.python.org/pypi/fix-yahoo-finance

from pandas_datareader import data as pdr
import datetime
import fix_yahoo_finance as yf
yf.pdr_override()

pdr.get_data_yahoo('AAPL',
start=datetime.datetime(2006, 10, 1),
end=datetime.datetime(2012, 1, 1))

@SecondJob
Copy link

I rolled back my install to version 0.5.0 and it works again. Hope it works for others.

@panfeng-espressif
Copy link
Author

@SecondJob That's really works for me. Thank you very much for sharing the solution.

@panfeng-espressif
Copy link
Author

@SutharMukesh I haven't tried your method of solving this issue. It seems that it would work effectively. I just come back to pandas_datareader version 0.5.0

@scubamut
Copy link

Thanks! Rolling back to version 0.5 works fine.

@RamneekSinghBakshi
Copy link

Can anyone tell how to rollback to version 0.5.0 in idle

@hizyq
Copy link

hizyq commented May 23, 2018

you can use get_data_morningstar() instead of get_data_yahoo(),it works

@koloyyee
Copy link

KeyError: 'Date' that's what I saw on the last line

@ggolla4
Copy link

ggolla4 commented Dec 26, 2018

conda install pandas-datareader=0.5.0

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