ropensci / taxadb

:package: Taxonomic Database
https://docs.ropensci.org/taxadb
Other
43 stars 13 forks source link

Broken provenance entries #96

Closed andrew-torda closed 2 years ago

andrew-torda commented 2 years ago

Is it possible that the provenance file is a bit broken ? If I do,

  library(taxadb)
  a <- taxadb::get_ids (names=c("homo sapiens"))

```I get,

Error in switch(compression, gzip = gzfile(path, ...), bz2 = bzfile(path, : EXPR must be a length 1 vector In addition: Warning message: In FUN(X[[i]], ...) : No sources found for hash://sha256/ae98e3de1cadd69c064aa7aeb26b89251b49926207d41f8185af28d5f7a8853d


I think there are two broken entries,
   2019_dwc_ncbi
   2021_common_itis

Does this then lead to the switch error, that seems to come from dbpylr falling over ?
cboettig commented 2 years ago

Thanks for the report. The current release of the resolver apparently doesn't know about some locations.

Can you test by setting:

Sys.setenv(CONTENTID_REGISTRIES="https://hash-archive.carlboettiger.info")

first?

cboettig commented 2 years ago

(will try and get an update to contentid soon to make sure it's a bit broader searching. also, once those data register hash-archive, the old resolver should start to work. apologies the new system clearly needs a bit of robustness testing! Thanks for your bug reports)

andrew-torda commented 2 years ago

The environment variable does fix it. Many thanks. I was wondering if there should be a way for taxa_tbl() to return a code saying it is not happy. Returning an empty tibble does not work, but it was not clear to me what the best approach would be without making the code less readable.