I am trying to find the distance between these two coordinates using openrouteservice and am getting the following error code.
ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
The following code was the exact example code given to me from openrouteservice, but I keep getting that error code. Also note I have removed my APIkey for security reasons. Any reasons?
import requests
headers = {
'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8',
}
call = requests.get('https://api.openrouteservice.org/v2/directions/driving-car?api_key=APIKEYHERE&start=8.681495,49.41461&end=8.687872,49.420318', headers=headers)
print(call.status_code, call.reason)
print(call.text)
You wrote:
I am unwilling to believe the vendor specified that
Accept:header. It appears to be a pair of headers conflated together. Roughly, it is a syntax error.Try using this instead:
Accept is about content types. The various Accept-foo headers are about foo.