You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this awesome package, I use it a lot to get road distances for my current project. I used to get error messages like this usually if I sent many coordinate pairs (approx. 10000) but since a week ago I immediately get the following message, without any distances/duration returned:
OSRM returned an error:
Error in if (res$code != "Ok") {: argument is of length zero
Error in osrm@data :
trying to get slot "data" from an object of a basic class ("NULL") with no slots
I think it was a API thing before but since it doesn’t work at all anymore, maybe you have any advice how to deal with it?
If it helps, here’s the code I send (to get all IDs I need I write all results into a dataframe, didn't use to be a problem before either):
Hello,
I have the same error message from time to time. The error message on the demo server is "{"message":"Too Many Requests"}".
You can try to replay the script and it may work.
The OSRM demo server, it is not always very stable.
The best solution is of course to run your own instance of OSRM, if it's possible...
Immediate error message
Thanks for this awesome package, I use it a lot to get road distances for my current project. I used to get error messages like this usually if I sent many coordinate pairs (approx. 10000) but since a week ago I immediately get the following message, without any distances/duration returned:
OSRM returned an error:
Error in if (res$code != "Ok") {: argument is of length zero
Error in osrm@data :
trying to get slot "data" from an object of a basic class ("NULL") with no slots
I think it was a API thing before but since it doesn’t work at all anymore, maybe you have any advice how to deal with it?
If it helps, here’s the code I send (to get all IDs I need I write all results into a dataframe, didn't use to be a problem before either):
dist <- data.frame(CID=distdat$CID, zipstart=distdat$zip, ptend=distdat$id, duration=NA, length=NA)
for (i in 1:15000)
{ osrm <- osrmRoute (src = distdat[i, c("zip","x","y")],
dst = distdat[i, c("id","long","lat")], sp="TRUE")
dist[i,4] <- osrm@data[1,3]
dist[i,5] <- osrm@data[1,4]
}
THANK YOU!!
The text was updated successfully, but these errors were encountered: