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 ?

Chanda Korat
  • 2,453
  • 2
  • 19
  • 23

2 Answers2

2

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

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

Priyank Mehta
  • 2,453
  • 2
  • 21
  • 32
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'

ArieAI
  • 354
  • 1
  • 12