Description
I have a piece of code that used to run without issues for many years and here is a great opportunity to extend a warm public thank you for your awesome code (and all the help you have provided to so many folks across so many forums).
require(quantmod)
getSymbols('YJ1306.T', from="1900-01-01", src = 'yahooj', auto.assign=TRUE)
I just ran it for the first time in a few months (it was working fine in March) and I received:
Error in getSymbols.yahooj(Symbols = "YJ1306.T", env = , :
Unable to import “YJ1306.T”.
XML content does not seem to be XML: '1'
Expected behavior
Usually, this call creates a variable YJ1306.T with the downloaded series.
Minimal, reproducible example
require(quantmod)
getSymbols('YJ1306.T', from="1900-01-01", src = 'yahooj', auto.assign=TRUE)
New section, if I may: what I tried!
put debug() around the function call. I can see that the function calls fdoc <- XML::htmlParse(URL) where URL points to Yahoo Japan historical data
This looks correct, so I am a little shocked this call seems to be failing... Looks fine to me.
This said, when I tried to browse directly to the security historical data page, I landed here. I am not sure this is relevant, but best is to let you decide, since you would know.
MUCH appreciated any help.
Session Info
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] quantmod_0.4.17 TTR_0.24.1 xts_0.12-0 zoo_1.8-8
loaded via a namespace (and not attached):
[1] bookdown_0.20 lattice_0.20-41 XML_3.99-0.5 digest_0.6.25 grid_4.0.2 evaluate_0.14
[7] rlang_0.4.7 curl_4.3 rmarkdown_2.3.3 tools_4.0.2 xfun_0.16 yaml_2.2.1
[13] compiler_4.0.2 htmltools_0.5.0 knitr_1.29
Description
I have a piece of code that used to run without issues for many years and here is a great opportunity to extend a warm public thank you for your awesome code (and all the help you have provided to so many folks across so many forums).
I just ran it for the first time in a few months (it was working fine in March) and I received:
Expected behavior
Usually, this call creates a variable
YJ1306.Twith the downloaded series.Minimal, reproducible example
New section, if I may: what I tried!
put
debug()around the function call. I can see that the function callsfdoc <- XML::htmlParse(URL)whereURLpoints to Yahoo Japan historical dataThis looks correct, so I am a little shocked this call seems to be failing... Looks fine to me.
This said, when I tried to browse directly to the security historical data page, I landed here. I am not sure this is relevant, but best is to let you decide, since you would know.
MUCH appreciated any help.
Session Info