AtlasOfLivingAustralia / ALA4R

Access data and resources hosted by the Atlas of Living Australia (ALA)
https://atlasoflivingaustralia.github.io/ALA4R/
42 stars 8 forks source link

Problems with Status Code 417 errors #14

Closed rdinnager closed 9 years ago

rdinnager commented 9 years ago

Hi there,

I think the functionality provided by ALA4R is really useful, and I have been trying to use it in a project. However I keep running into errors. I get Status Code 417 errors for any query using intersect_points where the number of points are greater than about 30 (the help says the limit is 100,000 points). Here is an example:

library(ALA4R)
pts <- cbind(lat = runif(1000, -40, -12), long = runif(1000, 115, 148))
intersect_points(pts, c("el707","el830")) ## two randomly chosen layers
Error in check_status_code(h$value()[["status"]], extra_info = diag_message) : 
ALA4R: HTTP status code 417 received.
Either there was an error with your request, in the ALA4R package, or the ALA servers are down. Please try again later and notify the package maintainers if you still have problems.
intersect_points(pts[1:25, ], c("el707","el830"))
    latitude longitude temperatureWarmestMonthMin distanceToPermanentWaterWeighted
1  -12.50860  145.7189                         NA                               NA
2  -21.41939  133.5143                      23.62                       0.39824614
3  -22.28138  120.4245                      23.87                       0.41593270
4  -26.60327  137.9844                      23.03                       0.62936470
5  -30.88682  131.9950                      16.23                       1.51092680
6  -32.61151  135.4042                      14.48                       1.30923640
7  -19.02391  129.0999                      23.29                       0.56320510
8  -13.38039  146.1419                         NA                               NA
9  -25.53504  144.0971                      22.04                       0.12041594
10 -12.54634  137.3376                         NA                               NA
11 -26.81527  144.0627                      21.62                       0.08246211
12 -33.61260  134.8484                      14.72                       1.11606450
13 -38.80239  134.7262                         NA                               NA
14 -37.19952  125.4121                         NA                               NA
15 -28.86901  139.5483                      21.89                       0.39217340
16 -31.11741  140.1852                      19.26                       1.02200780
17 -26.64699  119.1863                      22.59                       0.58137770
18 -39.35150  119.6296                         NA                               NA
19 -14.27043  128.7560                         NA                               NA
20 -17.32447  141.9878                      23.98                       0.02828427
21 -28.98620  116.3360                      19.56                       0.33615473
22 -17.77501  121.8608                         NA                               NA
23 -12.82748  128.8183                         NA                               NA
24 -17.31647  116.3364                         NA                               NA
25 -13.68585  138.9851                         NA                               NA
intersect_points(pts[1:35, ], c("el707","el830"))
Error in check_status_code(h$value()[["status"]], extra_info = diag_message) : 
ALA4R: HTTP status code 417 received.
Either there was an error with your request, in the ALA4R package, or the ALA servers are down. Please try again later and notify the package maintainers if you still have problems. 

This seems to happen with pretty much any layer I chose. I have tried reinstalling ALA4R but I still get the error. verbose = TRUE gives me no further information.

Any ideas what is going on?

raymondben commented 9 years ago

Hmm, server issue as far as I can tell. I'm checking with the ALA devs ...

rdinnager commented 9 years ago

Thanks for looking into this. I should note also that I tried a large intersect_points query about 2 weeks ago when I was trying out the package and it worked fine then, so this issue must have arisen recently.

raymondben commented 9 years ago

Server error fixed (thanks @adam-collins). Russell, let us know if the problem persists.

rdinnager commented 9 years ago

Everything is working now on my end. Great, thanks!