ropensci / rfishbase

R interface to the fishbase.org database
https://docs.ropensci.org/rfishbase
111 stars 40 forks source link

Error in curl::curl_download(addr, dest = local_tbl) : HTTP error 404. #215

Closed kairos35 closed 3 years ago

kairos35 commented 3 years ago

Although downloading the newest version and cleaning cache, with most functions I get the error in the title.

Also, some functions seem to be discontinued? e.g. get_latest_release(), which seemed to be used in other functions?

Mainly, I cannot access any tables. One example for the brains table

Screenshot 2021-08-05 at 12 06 23

Same error if I use provided code like

fish <- c("Oreochromis niloticus", "Salmo trutta")
fish <- validate_names(c("Oreochromis niloticus", "Salmo trutta"))
fish

I tried to find out which path the brains() function uses, and one suggestion I found is: image

R SESSION Information :

R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/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] dplyr_1.0.7     rfishbase_3.1.8

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7        pillar_1.6.2      compiler_4.1.0    dbplyr_2.1.1      prettyunits_1.1.1 remotes_2.4.0    
 [7] tools_4.1.0       progress_1.2.2    bit_4.0.4         RSQLite_2.2.7     jsonlite_1.7.2    memoise_2.0.0    
[13] lifecycle_1.0.0   tibble_3.1.3      pkgconfig_2.0.3   rlang_0.4.11      DBI_1.1.1         cli_3.0.1        
[19] curl_4.3.2        fastmap_1.1.0     arkdb_0.0.12      httr_1.4.2        stringr_1.4.0     generics_0.1.0   
[25] vctrs_0.3.8       hms_1.1.0         bit64_4.0.5       tidyselect_1.1.1  glue_1.4.2        R6_2.5.0         
[31] gh_1.3.0          fansi_0.5.0       blob_1.2.2        purrr_0.3.4       readr_2.0.0       tzdb_0.1.2       
[37] magrittr_2.0.1    ellipsis_0.3.2    assertthat_0.2.1  utf8_1.2.2        stringi_1.7.3     cachem_1.0.5     
[43] crayon_1.4.1     
> 

Thanks a lot for any advice!

mhesselbarth commented 3 years ago

First of all, thx for contributing this very helpful package.

I see the same error using rfishbase_3.1.8 on macOS Big Sur 11.5.1 and R v4.1.0.

I think the code worked for me in the past, so maybe a recent curl update broke something?

kairos35 commented 3 years ago

Correct, it worked for me last year, too. Now I wanted to update the data - and it's broke. Possible that the recent curl update broke something - alas I don't know how to test or even resolve this. And: issues #215 mentions, that the github release is still missing .... maybe the cran package and the github files are not "in sync"?

mhesselbarth commented 3 years ago

You probably refer to #206, but this shouldn't be of relevance here. I also just checked, the GitHub version. (main branch) also returns the same error message.

Probably nothing you can test or resolve at this point. Let's see what the developers say.

kairos35 commented 3 years ago

Ok. Thanks Just found an data update on https://github.com/ropensci/rfishbase/releases/tag/fb-21.04 instead of https://github.com/ropensci/rfishbase/releases/download/fb-21.04

mhesselbarth commented 3 years ago

Oh and a reproduciable example just in case:

library(rfishbase)
validate_names("Abramites ternetzi")
#> Error in curl::curl_download(addr, dest = local_tbl): HTTP error 404.

Created on 2021-08-05 by the reprex package (v2.0.0)

MichaelJSchram commented 3 years ago

FWIW - I ran some iterative queries up until ~6 PM EST last night which ran no problem. These are the same queries I have been scripting for a couple of months now. I get the same errors as others have reported when I tried to run those same scripts this morning (was so excited to access all that new DB cached data!)

kairos35 commented 3 years ago

The data update I found is from 14 hours ago - it's in a new folder (see comment above), file format parquet. So possibly, we need to wait until developers finished all code updates?

cboettig commented 3 years ago

Hi all,

apologies, preparing the new data dump, but meanwhile it is confusing the current release which doesn't know how to parse the new format. I'll srupress the 2021 tag until we're ready to ship

cboettig commented 3 years ago

p.s. meanwhile, if you set the version string to the previous release, things should work as before; e.g.:

rfishbase::species(version = "19.04")

21.04 data should be up now for FB, SLB coming soon. parquet-based release won't go live until the next release of the R package.

kairos35 commented 3 years ago

Hi Carl, thanks a million for your prompt help. My code is working fine again. And thank you so much for this package!