ropensci / taxadb

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

IO Error: Trying to read a database file with version number 11, but we can only read version 15. #94

Closed amoeba closed 3 years ago

amoeba commented 3 years ago

While running EML::set_taxonomicCoverage with expand=TRUE, I ran into an error which can be reproduced from taxadb directly:

> library(taxadb)
> get_ids("Trochalopteron henrici gucenense")
Error in initialize(value, ...) :
  duckdb_startup_R: Failed to open database: IO Error: Trying to read a database file with version number 11, but we can only read version 15.
The database file was created with an older version of DuckDB.

The storage of DuckDB is not yet stable; newer versions of DuckDB cannot read old database files and vice versa.
The storage will be stabilized when version 1.0 releases.

For now, we recommend that you load the database file in a supported version of DuckDB, and use the EXPORT DATABASE command followed by IMPORT DATABASE on the current version of DuckDB.

I did a bit of looking and it seems like there's some infrastructure I don't entirely understand that generates a database dump that might just need to get re-run? Any ideas @cboettig?

session_info() output ``` > devtools::session_info() ─ Session info ─────────────────────────────────────────────────────────────── setting value version R version 4.1.0 (2021-05-18) os macOS Big Sur 10.16 system x86_64, darwin17.0 ui X11 language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz America/Juneau date 2021-06-02 ─ Packages ─────────────────────────────────────────────────────────────────── package * version date lib source arkdb 0.0.12 2021-04-05 [1] CRAN (R 4.1.0) askpass 1.1 2019-01-13 [1] CRAN (R 4.1.0) assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.0) bit 4.0.4 2020-08-04 [1] CRAN (R 4.1.0) bit64 4.0.5 2020-08-30 [1] CRAN (R 4.1.0) blob 1.2.1 2020-01-20 [1] CRAN (R 4.1.0) cachem 1.0.5 2021-05-15 [1] CRAN (R 4.1.0) callr 3.7.0 2021-04-20 [1] CRAN (R 4.1.0) cli 2.5.0 2021-04-26 [1] CRAN (R 4.1.0) contentid 0.0.10 2021-04-27 [1] CRAN (R 4.1.0) crayon 1.4.1 2021-02-08 [1] CRAN (R 4.1.0) curl 4.3.1 2021-04-30 [1] CRAN (R 4.1.0) DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.0) dbplyr 2.1.1 2021-04-06 [1] CRAN (R 4.1.0) desc 1.3.0 2021-03-05 [1] CRAN (R 4.1.0) devtools 2.4.1 2021-05-05 [1] CRAN (R 4.1.0) digest 0.6.27 2020-10-24 [1] CRAN (R 4.1.0) dplyr 1.0.6 2021-05-05 [1] CRAN (R 4.1.0) duckdb 0.2.6 2021-05-09 [1] CRAN (R 4.1.0) ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.1.0) EML * 2.0.5 2021-02-27 [1] CRAN (R 4.1.0) emld 0.5.1 2020-09-27 [1] CRAN (R 4.1.0) evaluate 0.14 2019-05-28 [1] CRAN (R 4.1.0) fansi 0.5.0 2021-05-25 [1] CRAN (R 4.1.0) fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.1.0) fs 1.5.0 2020-07-31 [1] CRAN (R 4.1.0) generics 0.1.0 2020-10-31 [1] CRAN (R 4.1.0) glue 1.4.2 2020-08-27 [1] CRAN (R 4.1.0) hms 1.1.0 2021-05-17 [1] CRAN (R 4.1.0) htmltools 0.5.1.1 2021-01-22 [1] CRAN (R 4.1.0) httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.0) jqr 1.2.1 2021-05-06 [1] CRAN (R 4.1.0) jsonld 2.2 2020-05-27 [1] CRAN (R 4.1.0) jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.1.0) knitr 1.33 2021-04-24 [1] CRAN (R 4.1.0) lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.1.0) lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.1.0) magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0) memoise 2.0.0 2021-01-26 [1] CRAN (R 4.1.0) openssl 1.4.4 2021-04-30 [1] CRAN (R 4.1.0) pillar 1.6.1 2021-05-16 [1] CRAN (R 4.1.0) pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.1.0) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0) pkgload 1.2.1 2021-04-06 [1] CRAN (R 4.1.0) prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0) processx 3.5.2 2021-04-30 [1] CRAN (R 4.1.0) progress 1.2.2 2019-05-16 [1] CRAN (R 4.1.0) ps 1.6.0 2021-02-28 [1] CRAN (R 4.1.0) purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0) R6 2.5.0 2020-10-28 [1] CRAN (R 4.1.0) rappdirs 0.3.3 2021-01-31 [1] CRAN (R 4.1.0) Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.1.0) readr 1.4.0 2020-10-05 [1] CRAN (R 4.1.0) remotes 2.4.0 2021-06-02 [1] CRAN (R 4.1.0) rlang 0.4.11 2021-04-30 [1] CRAN (R 4.1.0) rmarkdown 2.8 2021-05-07 [1] CRAN (R 4.1.0) rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.0) RSQLite 2.2.7 2021-04-22 [1] CRAN (R 4.1.0) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.1.0) stringi 1.6.2 2021-05-17 [1] CRAN (R 4.1.0) taxadb * 0.1.3 2021-04-27 [1] CRAN (R 4.1.0) testthat 3.0.2 2021-02-14 [1] CRAN (R 4.1.0) tibble 3.1.2 2021-05-16 [1] CRAN (R 4.1.0) tidyselect 1.1.1 2021-04-30 [1] CRAN (R 4.1.0) usethis 2.0.1 2021-02-10 [1] CRAN (R 4.1.0) utf8 1.2.1 2021-03-12 [1] CRAN (R 4.1.0) uuid 0.1-4 2020-02-26 [1] CRAN (R 4.1.0) V8 3.4.2 2021-05-01 [1] CRAN (R 4.1.0) vctrs 0.3.8 2021-04-29 [1] CRAN (R 4.1.0) withr 2.4.2 2021-04-18 [1] CRAN (R 4.1.0) xfun 0.23 2021-05-15 [1] CRAN (R 4.1.0) xml2 1.3.2 2020-04-23 [1] CRAN (R 4.1.0) yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.0) [1] /Library/Frameworks/R.framework/Versions/4.1/Resources/library ```
cboettig commented 3 years ago

Yup, you must have upgraded duckdb and new versions aren't yet backwards compatible. The easiest thing is to purge taxadb_dir(),

unlink(taxadb:::taxadb_dir())

we should probably provide a helper function since that isn't even an exported fn. Hopefully duckdb will hit 1.0 soon and this will be less of an issue!

amoeba commented 3 years ago

Ah, okay. Nuking taxadb:::taxadb_dir() got things back to working. Thanks!