ropensci / taxize

A taxonomic toolbelt for R
https://docs.ropensci.org/taxize
Other
269 stars 61 forks source link

Error with tax_name(db = "ncbi") and : "API key invalid" #670

Closed paternogbc closed 6 years ago

paternogbc commented 6 years ago
Session Info ```r package * version date source ape 5.0 2017-10-30 CRAN (R 3.4.2) assertthat 0.2.0 2017-04-11 CRAN (R 3.4.2) base * 3.4.2 2017-10-12 local bindr 0.1 2016-11-13 CRAN (R 3.4.2) bindrcpp * 0.2 2017-06-17 CRAN (R 3.4.2) bold 0.5.0 2017-07-21 CRAN (R 3.4.2) cli 1.0.0 2017-11-05 CRAN (R 3.4.2) codetools 0.2-15 2016-10-05 CRAN (R 3.4.2) colorspace 1.3-2 2016-12-14 CRAN (R 3.4.2) compiler 3.4.2 2017-10-12 local crayon 1.3.4 2017-09-16 CRAN (R 3.4.2) crul 0.5.2 2018-02-24 CRAN (R 3.4.2) curl 3.1 2017-12-12 CRAN (R 3.4.2) data.table 1.10.4-3 2017-10-27 CRAN (R 3.4.2) datasets * 3.4.2 2017-10-12 local devtools 1.13.5 2018-02-18 CRAN (R 3.4.2) digest 0.6.15 2018-01-28 CRAN (R 3.4.2) dplyr * 0.7.4 2017-09-28 CRAN (R 3.4.2) foreach 1.4.4 2017-12-12 CRAN (R 3.4.2) ggplot2 * 2.2.1 2016-12-30 CRAN (R 3.4.2) git2r 0.21.0 2018-01-04 CRAN (R 3.4.2) glue 1.2.0 2017-10-29 CRAN (R 3.4.2) graphics * 3.4.2 2017-10-12 local grDevices * 3.4.2 2017-10-12 local grid 3.4.2 2017-10-12 local gtable 0.2.0 2016-02-26 CRAN (R 3.4.2) httr 1.3.1 2017-08-20 CRAN (R 3.4.2) iterators 1.0.9 2017-12-12 CRAN (R 3.4.2) jsonlite 1.5 2017-06-01 CRAN (R 3.4.2) knitr 1.20 2018-02-20 CRAN (R 3.4.2) lattice 0.20-35 2017-03-25 CRAN (R 3.4.2) lazyeval 0.2.1 2017-10-29 CRAN (R 3.4.2) magrittr 1.5 2014-11-22 CRAN (R 3.4.2) memoise 1.1.0 2017-04-21 CRAN (R 3.4.2) methods * 3.4.2 2017-10-12 local munsell 0.4.3 2016-02-13 CRAN (R 3.4.2) nlme 3.1-131 2017-02-06 CRAN (R 3.4.2) parallel 3.4.2 2017-10-12 local pillar 1.2.1 2018-02-27 CRAN (R 3.4.2) pkgconfig 2.0.1 2017-03-21 CRAN (R 3.4.2) plyr 1.8.4 2016-06-08 CRAN (R 3.4.2) R6 2.2.2 2017-06-17 CRAN (R 3.4.2) Rcpp 0.12.15 2018-01-20 CRAN (R 3.4.2) reshape 0.8.7 2017-08-06 CRAN (R 3.4.2) reshape2 1.4.3 2017-12-11 CRAN (R 3.4.2) ritis 0.7.0 2017-11-03 CRAN (R 3.4.2) rlang 0.2.0 2018-02-20 CRAN (R 3.4.2) rstudioapi 0.7 2017-09-07 CRAN (R 3.4.2) scales 0.5.0 2017-08-24 CRAN (R 3.4.2) solrium 1.0.0 2017-11-02 CRAN (R 3.4.2) stats * 3.4.2 2017-10-12 local stringi 1.1.6 2017-11-17 CRAN (R 3.4.2) stringr 1.3.0 2018-02-19 CRAN (R 3.4.2) taxize * 0.9.2.9421 2018-03-16 Github (ropensci/taxize@4a59e12) tibble 1.4.2 2018-01-22 CRAN (R 3.4.2) tools 3.4.2 2017-10-12 local triebeard 0.3.0 2016-08-04 CRAN (R 3.4.2) urltools 1.7.0 2018-01-20 CRAN (R 3.4.2) utf8 1.1.3 2018-01-03 CRAN (R 3.4.2) utils * 3.4.2 2017-10-12 local withr 2.1.1 2017-12-19 CRAN (R 3.4.2) xml2 1.2.0 2018-01-24 CRAN (R 3.4.2) yaml 2.1.18 2018-03-08 CRAN (R 3.4.2) zoo 1.8-1 2018-01-08 CRAN (R 3.4.2) ```

Hi all, thanks for developing such a nice R package! I am getting an error when trying to run the function tax_name(). A reproducible example below.

library(taxize)
tax_name(query = "Helianthus annuus", get = "family", db = "ncbi")

No ENTREZ API key provided
See https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/

Retrieving data for taxon 'Helianthus annuus'

Error: '{"error":"API key invalid","api-key":"","type":"invalid","status":"unknown"}' does not exist in current working directory ('/home/paterno/Dropbox/Ciência/UFRN/Doutorado/Chapters/1_Global Allometry/analysis_global_allometry_thesis').

Any suggestions? Many thanks in advance

sckott commented 6 years ago

@paternogbc thanks for this

can you reinstall/restart R and try again, just merged a related pull request.

paternogbc commented 6 years ago

Awesome @sckott! Just re-Installed dev version from Github. Working fine now! Thanks for the quick reply!

> tax_name(query = "Helianthus annuus", get = "family", db = "ncbi")
No ENTREZ API key provided
See https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/

Retrieving data for taxon 'Helianthus annuus'

No ENTREZ API key provided
See https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
    db             query     family
1 ncbi Helianthus annuus Asteraceae
sckott commented 6 years ago

great.

you should go get an ENTREZ API key when you get a chance

paternogbc commented 6 years ago

Just read about this! Registering right now! Cheers!