I started to get an error while downloading some stock's data from yahoo finance web site in R. I am using get.hist.quote function from tseries package .
Last week, there was no problem.
May code is as below:
library(tseries)
data<-get.hist.quote(instrument = "EREGL.IS,
provider="yahoo",
quote=c("Open","High","Low","Close","AdjClose","Volume"),
start="2010-01-01",
end="2017-02-03",
compression="d",
retclass="zoo")
`
I get the below error:
trying URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
download error, retrying ...
trying URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
download error, retrying ...
trying URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
download error, retrying ...
trying URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
download error, retrying ...
trying URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
Error in get.hist.quote(instrument = "EREGL.IS", provider = "yahoo", quote = c("Open", :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv'
In addition: Warning messages:
1: In download.file(url, destfile, method = method, quiet = quiet) :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
2: In download.file(url, destfile, method = method, quiet = quiet) :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
3: In download.file(url, destfile, method = method, quiet = quiet) :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
4: In download.file(url, destfile, method = method, quiet = quiet) :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
5: In download.file(url, destfile, method = method, quiet = quiet) :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=EREGL.IS&a=0&b=01&c=2010&d=1&e=03&f=2017&g=d&q=q&y=0&z=EREGL.IS&x=.csv': HTTP status was '504 Maximum Transaction Time Exceeded'
Why do I get this error? One possibility is changing name of the related url.
How can I fix this problem? I will be very glad for any help. Thanks a lot.