Closed jswesner closed 2 months ago
@jswesner Thanks for getting in touch about this. The neonUtilities package uses curl::has_internet() to check whether the user has internet access before it tries to download anything, and in rare cases curl::has_internet() returns FALSE even when a connection is available. There are a variety of reasons why this might happen, so rather than try to figure out the root cause, it's easiest to just force the function to return TRUE and proceed. The simplest way to do that is to run
assign("has_internet_via_proxy", TRUE, environment(curl::has_internet))
before running the neonUtilities code. For more examples and other ways of getting around curl::has_internet(), this StackOverflow post is helpful https://stackoverflow.com/questions/59796178/r-curlhas-internet-false-even-though-there-are-internet-connection
Let us know if this solves the problem!
That worked. Thanks @cklunch!
Hi - We are getting this error on multiple machines, when running the tutorial code from here:https://www.neonscience.org/resources/learning-hub/tutorials/download-explore-neon-data
parlist <- loadByProduct(dpID="DP1.00024.001", site="WREF", startdate="2019-09", enddate="2019-11")
'No internet connection. Cannot access NEON API.'
We do have internet and it does not work even if we use our NEON token.