Out of bounds error


#1

Hi. I am getting API Error 500 when I use location coordinates
coords = ((1.404052, 103.9053),
(1.404584, 103.9052),
(1.404375, 103.9048),
(1.405832, 103.9068),
(1.406081, 103.9064),
(1.408701, 103.9013))
client = openrouteservice.Client(key=’’) # Specify your personal API key
routes = client.directions(coords, profile=‘cycling-regular’,optimize_waypoints=True)

print(routes)

The error is as follows:
ApiError: 500 ({‘code’: 3, ‘error’: ‘ORS matrix:Source point(s) [0, 1, 2, 3, 4, 5] out of bounds: 103.9053,1.404052; 103.9013,1.408701; 103.9052,1.404584; 103.9048,1.404375; 103.9068,1.405832; 103.9064,1.406081. Destination point(s) [0, 1, 2, 3, 4, 5] out of bounds: 103.9053,1.404052; 103.9013,1.408701; 103.9052,1.404584; 103.9048,1.404375; 103.9068,1.405832; 103.9064,1.406081’})

How can I fix this?


#2

Hi @Shashi_Kant,

Please use the correct coordinates order, which is longitude,latitude.

Best regards