CDK-R / rpubchem

An R interface to the PubChem Compound and Bioassay Resource
Apache License 2.0
0 stars 2 forks source link

Error when using get.cid() #3

Open ningshi opened 4 years ago

ningshi commented 4 years ago

I tried to use the example given in get.cid()

cids <- c(5282108, 5282148, 91754124)
dat <- lapply(cids, get.cid)

then i got

Error in if (info.name == n) info.name <- "" : argument is of length zero

Could you please take a look at this error.

korseby commented 4 years ago

When I do something like get.sid(7366998) I get the following error. I assume that these errors are connected to the one reported by @ningshi

[1] "Error in download.file(url, destfile = dest, method = \"internal\", mode = \"wb\",  : \n  cannot open URL 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=rpubchem&db=pcsubstance&id=7366998'\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in download.file(url, destfile = dest, method = "internal", mode = "wb",     quiet = quiet): cannot open URL 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=rpubchem&db=pcsubstance&id=7366998'>
Error in .get.xml.file(url, datafile, quiet) : Error in the download
In addition: Warning message:
In download.file(url, destfile = dest, method = "internal", mode = "wb",  :
  "internal" method cannot handle https redirection to: 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?tool=rpubchem&db=pcsubstance&id=7366998'