BioGeoMacro/GIFT

Error in readBin when trying to get traits data

Closed this issue · 2 comments

Hello,

I try to get data from the GIFT_traits function, as described in the Get Started tutorial, but it seems to have a bug.

I can't generate the first object (generated by the following code : height <- GIFT_traits(trait_IDs = c("1.6.2"), agreement = 0.66,
bias_ref = FALSE, bias_deriv = FALSE)
)

Here, I get this error :

Error in readBin(3L, raw(0), 32768L) : cannot read from connection
In addition: Warning message:
In readBin(3L, raw(0), 32768L) :
URL 'https://gift.uni-goettingen.de/api/extended/index3.1.php?query=species&startat=200000': Timeout of 60 seconds was reached

How can I fix it ? Is it because of a bug in the API key ? Or is it because of the quality of my internet connection ?

Thank you in advance for you help

Hello @alittlevixen,

I had the same issue lately. It could be an issue with internet connectivity and speed of download, so, I'm not sure about 'fixing it'. However, I am able to download data without difficulties after adjusting the timeout session from 60seconds to 300seconds.

options(timeout = max(300, getOption("timeout")))

Hope it works for you too.

Thanks,

Anthony

We added a side-note in the beginning of the main vignette with this workaround.