taxize icon indicating copy to clipboard operation
taxize copied to clipboard

HTTP error using ITIS for classification

Open IREdwards27 opened this issue 3 years ago • 6 comments

I and another member in the lab I work in are using the command classification(n, db = 'itis', accepted = TRUE) to fill in taxonomic info for taxa in a database, and on and off through the last few days we've gotten the following error:

Error: Bad Gateway (HTTP 502)

The book asks that HTTP 502 errors be reported to y'all so you can communicate with the data provider, so I wanted to provide details so that can happen. Thank you!

Session Info

sessionInfo:

R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252

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

other attached packages: [1] stringr_1.4.0 maps_3.3.0 taxize_0.9.99 tidyr_1.1.3 dplyr_1.0.6

loaded via a namespace (and not attached): [1] Rcpp_1.0.6 pillar_1.6.1 compiler_4.1.0 plyr_1.8.6 ritis_1.0.0 iterators_1.0.13 [7] tools_4.1.0 uuid_0.1-4 jsonlite_1.7.2 lifecycle_1.0.0 tibble_3.1.2 nlme_3.1-152
[13] lattice_0.20-44 pkgconfig_2.0.3 rlang_0.4.11 foreach_1.5.1 rstudioapi_0.13 DBI_1.1.1
[19] cli_2.5.0 crul_1.1.0 curl_4.3.1 parallel_4.1.0 xml2_1.3.2 generics_0.1.0
[25] vctrs_0.3.8 triebeard_0.3.0 grid_4.1.0 tidyselect_1.1.1 data.table_1.14.0 reshape_0.8.8
[31] glue_1.4.2 httpcode_0.3.0 R6_2.5.0 fansi_0.5.0 conditionz_0.1.0 solrium_1.2.0
[37] purrr_0.3.4 magrittr_2.0.1 urltools_1.7.3 codetools_0.2-18 ellipsis_0.3.2 assertthat_0.2.1 [43] bold_1.2.0 ape_5.5 utf8_1.2.1 stringi_1.6.1 crayon_1.4.1 zoo_1.8-9

IREdwards27 avatar Jul 16 '21 17:07 IREdwards27

it was probably a temporary error, try it again

sckott avatar Jul 17 '21 05:07 sckott

i will echo the original poster issue, as I have had issues with itis specifically. It seems that on mondays AM (EST) the error is almost a guarantee... today being the same. is there anything further we can furnish to get into this?

nahuron avatar Dec 13 '21 18:12 nahuron

That error (if it occurs only occasionally) looks like it is an issue with the ITIS server that we are unlikely to be able to address on our side. I just tried classification(129313, db = 'itis') and it worked. Does this happens for solid blocks of time or do specific queries fail while other around the same time succeed?

zachary-foster avatar Dec 13 '21 19:12 zachary-foster

i periodically check if my queries with ritis as well as taxize work (mainly using taxize::get_tsn_(). Today, I have checked a number of times, and on this last check, my queries (including trying your classification example) have begun to work but were returning the error prior to 1300 EST. I think it is as you say @zachary-foster , it is probably something on the ITIS server side?

nahuron avatar Dec 13 '21 19:12 nahuron

yeah, in my experience, ITIS just has quite a bit of downtime, and that's the way the service is. If its super painful to have these errors, you could try various other ways of querying itis, eg., https://github.com/ropensci/taxizedb/ or https://github.com/ropensci/taxadb or if you are a SQL person just download the database yourself https://www.itis.gov/downloads/index.html

sckott avatar Dec 13 '21 21:12 sckott

Thanks for chiming in @sckott as well. I've been putting off getting my feet wet with SQL, but if I can't get through the queries I have left, I may just have to bite the bullet! It may be worth trying to get a schedule of the routine ITIS downtime to tuck in function documentation if it's easy enough to come by.

nahuron avatar Dec 14 '21 16:12 nahuron