gis-ops / routingpy

🌎 Python library to access all public routing, isochrones and matrix APIs in a consistent manner.
https://routingpy.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
270 stars 26 forks source link

fix here provider, handling failed routes #67

Closed nurikk closed 2 years ago

nurikk commented 2 years ago

There are cases when here can't compute routes between points. And summary field is missing

The summary is included in the response only if route calculation succeeds.

https://developer.here.com/documentation/routing/dev_guide/topics/resource-type-route-matrix-entry.html

This causes KeyError

>           if "travelTime" in obj["summary"]:
E           KeyError: 'summary'
nilsnolde commented 2 years ago

great thanks!!