ropensci / rfishbase

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

cannot open the connection to 'https://huggingface.co #288

Open YQ303 opened 1 month ago

YQ303 commented 1 month ago

I encountered following connecting issues for almost all functions in the package.

validate_names(species.list) Error in open.connection(con, "rb") : cannot open the connection to 'https://huggingface.co/api/datasets/cboettig/fishbase/tree/main/data/fb'

I wonder if there is any possible solution, e.g. by mannually downloading necessary data? Thanks for any suggestions!!!

andybeet commented 1 month ago

Which version of the package are you using? I dont see this issue using v5.0.0

packageVersion("rfishbase");
#> [1] '5.0.0'
  species_list <- c("Scomber scombrus","Pollachius virens","Pollachius virens");
  rfishbase::validate_names(species_list)
#> Joining with `by = join_by(Subfamily, GenCode, FamCode)`
#> Joining with `by = join_by(FamCode)`
#> Joining with `by = join_by(Order, Ordnum, Class, ClassNum)`
#> Joining with `by = join_by(Class, ClassNum)`
#> [1] "Scomber scombrus"  "Pollachius virens" "Pollachius virens"

Created on 2024-09-12 with reprex v2.1.0

YQ303 commented 1 month ago

Thank you for your reply! I'm also using version '5.0.0'. I have figured out that the error was caused by some network problem which, unfortunately, I could not solve. So I'm still wondering whether I could avoid the network issue by mannually downloading necessary data?

cboettig commented 1 month ago

@YQ303 you might try updating other packages too:

remotes::install_github("ropensci/rfishbase", deps=TRUE, upgrade=TRUE)

then restart R and try again?

You can attempt to access the data directly too at https://huggingface.co/datasets/cboettig/fishbase.

YQ303 commented 1 month ago

Thanks!! I will try access the data directly !!