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

Error in if (substr(file.name, 1, 5) != "http:") {: argument is of length zero Traceback: #10

Open
joeymizrahi opened this issue Nov 6, 2018 · 2 comments

Comments

@joeymizrahi
Copy link

joeymizrahi commented Nov 6, 2018

im running the following code:
library(XBRL) xbrl_url2014 <- "https://www.sec.gov/Archives/edgar/data/1400000/000121152415000130/abki-20150531_cal.xml" old_o <- options(stringsAsFactors = FALSE) xbrl_data_aapl2014 <- xbrlDoAll(xbrl_url2014) options(old_o)

and keep getting the following error:

Error in if (substr(file.name, 1, 5) != "http:") {: argument is of length zero
Traceback:

  1. xbrlDoAll(xbrl_url2014)
  2. xbrl$processSchema(xbrl$getSchemaName())
  3. which(discovered.files == file)
  4. xbrl$getSchemaName()
  5. fixFileName(dname.inst, .Call("xbrlGetSchemaName", doc.inst,
    . PACKAGE = "XBRL"))
@ABSYKS
Copy link

ABSYKS commented Feb 10, 2019

Just had a similar issue - it looks like you've used the linkbase calculations document instead of the XBRL instance needed ending in .xml as opposed to _cal.xml
Hope that helps.

@Karnner2
Copy link

Karnner2 commented Apr 22, 2020

edit the XBRL, by doing the following:
trace('XBRL', edit=TRUE)

change the XBRL code where it calls the http, to include https. The issue is not with finstr.

#if (!(substr(file.name, 1, 5) %in% c("http:", "https"))) {

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