Error moving from “api.openrouteservice.org” in favour of “api.heigit.org”

Hi,
after I read the announcement “Deprecating openrouteservice in favour of heigit ” I tried to move to the new base_url of my client from python code:
ors_client = openrouteservice.Client(key=OPENROUTE_API_KEY, base_url=OPENROUTE_BASE_URL)

If I use:
OPENROUTE_BASE_URL=“https://api.heigit.org/openrouteservice/”
I obtain the errors:
500 ERROR:app.services.openroute_service::cross_mark: ROUTE FAILED: 405 ({‘type’: ‘about:blank’, ‘title’: ‘Method Not Allowed’, ‘status’: 405, ‘detail’: “Method ‘GET’ is not supported.”, ‘instance’: ‘/ors/v2/directions/foot-walking/geojson’, ‘properties’: None})
500 ERROR:app.services.openroute_service::cross_mark: ROUTE FAILED: 405 ({‘type’: ‘about:blank’, ‘title’: ‘Method Not Allowed’, ‘status’: 405, ‘detail’: “Method ‘GET’ is not supported.”, ‘instance’: ‘/ors/v2/directions/cycling-regular/geojson’, ‘properties’: None})
500 ERROR:app.services.openroute_service::cross_mark: ROUTE FAILED: 405 ({‘type’: ‘about:blank’, ‘title’: ‘Method Not Allowed’, ‘status’: 405, ‘detail’: “Method ‘GET’ is not supported.”, ‘instance’: ‘/ors/v2/directions/driving-car/geojson’, ‘properties’: None})

Instead, if I set: OPENROUTE_BASE_URL=“https://api.openrouteservice.org/”
everything works fine.

What is my mistake?
Thanks a lot

Mario

Hey,

 OPENROUTE_BASE_URL=“https://api.heigit.org/openrouteservice”

should be working - note the missing forward slash / at the end of the URL.

We are looking into fixing this so the python SDK uses api.heigit.org by default :slight_smile:

Best regards

2 Likes

I confirm, it works without the “/” at the end.
So: OPENROUTE_BASE_URL=“https://api.heigit.org/openrouteservice

Thanks a lot

Mario

2 Likes