1

I am trying to get elevation data set along a route using Google maps API python client. When i request for a thousand coordinates, after a certain limit, an exception is raised.

for i in range(1000):
   eljson = gmaps.elevation(list_coordinates[i])


**raise googlemaps.exceptions.Timeout()**

Is it because I'm exceeding usage of 2500 api requests or the rate of requests is high and have to slow down the requests per second ?

2 Answers 2

2

Most probably yes. You can verify it by logging into your account at below link

https://console.developers.google.com/iam-admin/quotas

Sign up to request clarification or add additional context in comments.

1 Comment

I would say rate of requests just check by introducing pause in between requests
0

I had a similar error, and after following suggestions online, still didn't figure out why that happened (didn't seem like I was blocked, or reached a maximum). for me the problem was that the internet connection was interrupted. Restarting the kernel solved the problem.

Friendly suggestion: if it was not already done, before you restart the kernel, save/export the points you already got, otherwise you'll have to call the api for them again... can sum-up if this is a reoccurring problem...

EDIT:
In fact, this doesnt fully solve the problem as I still get this error:

ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

for this, the following was helpful: Python client error 'Connection reset by peer'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.