Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SiteID = NA causes hanging errors #6

Closed
sebsfox opened this issue Jun 9, 2017 · 1 comment
Closed

SiteID = NA causes hanging errors #6

sebsfox opened this issue Jun 9, 2017 · 1 comment

Comments

@sebsfox
Copy link

@sebsfox sebsfox commented Jun 9, 2017

Hi - the package is great. Thanks for making it available.

I get errors with most functions when I include sites where SiteID = NA, eg:

library(rdefra)
stations_raw <- ukair_catalogue()
stations <- ukair_get_coordinates(stations_raw)

Gives the following error:
Error in curl::curlfetchmemory(url, handle = handle) : Failure when receiving data from the peer

Though the following works instantly:

library(rdefra)
stations_raw <- ukair_catalogue()
stations <- ukair_get_coordinates(stations_raw[!is.na(stations_raw$EMEP.Site.ID),])

Thanks

cvitolo added a commit that referenced this issue Jul 28, 2018
FIXED BUG
* SiteID = NA causes hanging errors [#6](#6)
@cvitolo
Copy link
Collaborator

@cvitolo cvitolo commented Jul 28, 2018

The problem seems to be with the number of requests sent to the server, not with NAs.
Your second example (that works) you are sending less than 1000 requests.
In your first example you are sending more than 1000 requests, which causes the server to fail.

I have temporarily disabled http2, as explained here.

Now your first example works, although NAs might be generated by coercion.

I'm closing this as the issue is resolved. Thanks for reporting it!

@cvitolo cvitolo closed this Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.