matildabrown / rWCVP

Generating Summaries, Reports and Plots from the World Checklist of Vascular Plants
https://matildabrown.github.io/rWCVP/
GNU General Public License v3.0
19 stars 0 forks source link

WCVP check version error when working offline #58

Closed matildabrown closed 8 months ago

matildabrown commented 1 year ago

The quiet 'wcvp_check_version' (strictly rWCVPdata but called by rWCVP) triggers this error if no internet connection:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached: [sftp.kew.org] Connection timeout after 10015 ms

Desired behaviour: Check if internet connection available; if not, give warning: Warning: Cannot verify whether rWCVP is using the latest version of the WCVP.

Will fix in next update.

matildabrown commented 11 months ago

Current workaround:

library(rWCVP)

wcvp_summary("Eucalyptus","genus") # throws the error
# Error in curl::curl_fetch_memory(url, handle = handle) : 
#   Timeout was reached: [sftp.kew.org] Connection timeout after 10001 ms

# setting up 'local' versions using rWCVPdata 
# (without checking the version)
names <- rWCVPdata::wcvp_names
distributions <- rWCVPdata::wcvp_distributions

#using the local versions
wcvp_summary("Eucalyptus","genus", 
             wcvp_names = names, 
             wcvp_distributions = distributions)