-
Notifications
You must be signed in to change notification settings - Fork 30
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
List index out of range error for google directions #15
Comments
What I'd expect from a well-behaved API is a 404.. Or any 4xx, which is what would prevent smth like that. But google maps 🤷 |
I guess we should still handle it (eventually anyways;)), even if Google is being idiot here.. |
There's another really weird unrelated (unsure if its google specific, likely is) edge case, where requesting a walk or car route can sometimes result in a route with a ferry step |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what I did (dry run output):
url:
https://maps.googleapis.com/maps/api/directions/json?departure_time=1602059400&destination=37.42306%2C-122.08413&key=####################&mode=transit&origin=37.26044%2C-122.11921&units=metric
Parameters:
{
"headers": {
"User-Agent": "routingpy/v0.3.2",
"Content-Type": "application/json"
},
"timeout": 60
}
Here's what I got
Seems to be cause by this repsonse:
{'available_travel_modes': ['DRIVING', 'WALKING', 'BICYCLING'], 'geocoded_waypoints': [{}, {}], 'routes': [], 'status': 'ZERO_RESULTS'}
Here's what I was expecting
Empty direction object if response is:
{'available_travel_modes': ['DRIVING', 'WALKING', 'BICYCLING'], 'geocoded_waypoints': [{}, {}], 'routes': [], 'status': 'ZERO_RESULTS'}
The text was updated successfully, but these errors were encountered: