2

I'm trying to use the rnoaa R package and am having some difficulty. When I run the following I get an error.

>ghcnd_stations()
Error in curl::curl_fetch_memory(x$url$url, handle = x$url$handle) : 
  Timeout was reached: Connection timed out after 10000 milliseconds

I don't have any issues with other requests

>ncdc_stations(limit=1)
$meta
$meta$totalCount
[1] 139456

$meta$pageCount
[1] 1

$meta$offset
[1] 1


$data
  elevation    mindate    maxdate latitude             name datacoverage          id elevationUnit longitude
1       139 1948-01-01 2014-01-01  31.5702 ABBEVILLE, AL US       0.8813 COOP:010008        METERS  -85.2482

attr(,"class")
[1] "ncdc_stations"

I've tried changing global options with

>set_config(timeout(seconds = 60))

But no success. Any help would be appreciated.

iantist
  • 833
  • 2
  • 12
  • 27
  • I just ran it successfully. Can you call the functions `get_stations` and `get_inventory` individually? Which one of them is causing the time-out? – SeGa Dec 20 '19 at 08:52
  • Both of those functions worked without problems – iantist Dec 20 '19 at 13:19
  • Then the function should work without errors. As besides those 2 GET requests, its just merging datasets together. Is the error always coming or just sometimes? – SeGa Dec 20 '19 at 19:48
  • I always get the error – iantist Dec 23 '19 at 15:39
  • Did you try cleaning your test data? Maybe there is something wrong with them – BugsForBreakfast Dec 26 '19 at 18:51
  • @iantist sorry for my delay. `rnoaa` maintainer here. It was likely just a temporary error because of problems on the NOAA side. Is this problem still happening? Also note that `rnoaa` uses the `crul` package for http requests, so `httr::set_config` won't do anything, see https://docs.ropensci.org/crul/reference/index.html#section-request-debugging-inspection for curl configuration with `crul` – sckott Aug 11 '20 at 15:03

0 Answers0