ropensci / taxadb

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

error: could not resolve host hash-archive.org #89

Closed vsbuffalo closed 3 years ago

vsbuffalo commented 3 years ago

Hello!

I am currently having an issue with taxadb version 0.1.2. Here's a MRE from the documentation:

library(taxadb)
get_ids("Trochalopteron henrici gucenense") 

which errors out with Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: hash-archive.org

Session info:

> sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] taxadb_0.1.2   devtools_2.4.0 usethis_2.0.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6        pillar_1.6.0      compiler_4.0.5    dbplyr_2.1.1
 [5] progress_1.2.2    prettyunits_1.1.1 remotes_2.3.0     tools_4.0.5
 [9] bit_1.1-15.2      testthat_3.0.2    contentid_0.0.9   pkgbuild_1.2.0
[13] pkgload_1.2.1     RSQLite_2.2.0     jsonlite_1.7.2    tibble_3.1.1
[17] memoise_2.0.0     lifecycle_1.0.0   pkgconfig_2.0.3   rlang_0.4.10
[21] cli_2.5.0         DBI_1.1.0         curl_4.3          fastmap_1.0.1
[25] duckdb_0.2.5      arkdb_0.0.12      withr_2.4.2       httr_1.4.2
[29] dplyr_1.0.5       rappdirs_0.3.1    hms_1.0.0         desc_1.3.0
[33] generics_0.0.2    fs_1.5.0          vctrs_0.3.7       askpass_1.1
[37] bit64_0.9-7       tidyselect_1.1.0  rprojroot_1.3-2   glue_1.4.1
[41] R6_2.4.1          processx_3.5.1    fansi_0.4.1       sessioninfo_1.1.1
[45] blob_1.2.1        readr_1.4.0       callr_3.7.0       purrr_0.3.4
[49] magrittr_2.0.1    backports_1.1.8   ps_1.6.0          ellipsis_0.3.1
[53] assertthat_0.2.1  utf8_1.1.4        stringi_1.4.6     openssl_1.4.3
[57] cachem_1.0.4      crayon_1.4.1
vsbuffalo commented 3 years ago

Ok, poking around a bit more, I see this is from contentid::resolve(). I'm happy to close this issue and repost in the contentid repo if you like — though, for now, it would be useful to know if there's a way I can avoid hash-archive.org entirely while it's down?

cboettig commented 3 years ago

@vsbuffalo Thanks for reporting! Yup, that's the issue, I've just patched this on master over at https://github.com/cboettig/contentid. (contentid should now warn instead of throwing an error while the hash-archive.org server is completely down, which should allow things to fall back to another resolver). Lemme know if you get a chance to test and I'll push a new contentid to CRAN soon

cboettig commented 3 years ago

(p.s. you can indeed alter the default registries used by contentid, e.g. to not include https://hash-archive.org, by setting the env var CONTENTID_REGISTRIES, see https://github.com/cboettig/contentid/blob/master/R/default_registries.R. Still, I think I haven't really nailed down the best interface for opting in/out of different registries or the best model for adding extensions; I'd really appreciate your thoughts on that if you poke around.

last thing I'll toss in while I'm bugging you for input: you might take a quick look at taxalight as well, https://github.com/cboettig/taxalight/, it accesses the same formatted darwin core tables data as taxadb, but uses LMDB instead of a relational database as the backend. As you know, this means we sacrifice some of the flexibility of full SQL but gain a lot in speed for the 'standard' operations of resolving names <-> ids.

vsbuffalo commented 3 years ago

Thanks so much Carl for this quick fix and this information!

Installing contentid using devtools::install_github('cboettig/contentid') did the trick! taxalight looks very cool, I'll check it out!

cboettig commented 3 years ago

Just a note that contentid 0.0.10 is now on CRAN