r - Try Catch not catching "error : unknown IO error" - I/O warning : failed to load external entity -
the code underneath part of function. getlatestfilename function gets correct filename (locally stored).
the error caused trycatch expression: result <- try(xbrldoall...) though tried catch try function , try catch, changed options show.error.messages = false. keep getting following output causes r crash:
[1] "final step"
[1] "step 1"
error : unknown io error
i/o warning : failed load external entity "http://xbrl.us/us-gaap/1.0/elts/us-gaap-all-2008-03-31.xsd"
based on got printed, suppose error caused xbrl package, when tries info url above.
can me out?
instance <- getlatestfilename(ticker, date, type) options(stringsasfactors = false) result <- na #result <- try(xbrldoall(instance, cache.dir = "xbrlcache", prefix.out = null), silent = true) trycatch({ print("step 1") options(show.error.messages = false) result <- try(xbrldoall(instance, cache.dir = null, prefix.out = null), silent = true) print("step2") }, warning <- function(w) { result <- na print("warning") }, error = function(e) { result <- na print(result) print("test") }, <- { print("final step") }) try(is.na(result)) print("we did here")
i solved specific issue placing taxonomy files 2008 in xbrlcache folder.
i downloaded correct files (not empty error was) @ link:
http://xbrl.us/documents/xbrlusgaaptaxonomies-2008-03-31.zip
there can problem loading page saw did not work. servers busy..
i hope works other people well!
too bad did not solve not catching problem..
Comments
Post a Comment