googlemaps / googlemaps/google-maps-services-python

Timeout when trying to process nearby search request

Abierto
#377 3 comentarios 0 reacciones 0 asignados Ver en GitHub
triage me type: bug
Lenguaje dominante
Python
Estrellas
5k
Forks
1.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I'm facing a timeout when trying to process the following request:

```python
gmaps = googlemaps.Client(key="my_api_key")
result = gmaps.places_nearby(location="-23.5506507,-46.6333824", type="store", radius=1000)
```

The complete error stack tracing is:
```python
---------------------------------------------------------------------------
Timeout Traceback (most recent call last)
in ()
----> 1 result = gmaps.places_nearby(location="-23.5506507,-46.6333824", type="store", radius=50000)
2 result

15 frames
/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in wrapper(*args, **kwargs)
416 def wrapper(*args, **kwargs):
417 args[0]._extra_params = kwargs.pop("extra_params", None)
--> 418 result = func(*args, **kwargs)
419 try:
420 del args[0]._extra_params

/usr/local/lib/python3.6/dist-packages/googlemaps/places.py in places_nearby(client, location, radius, keyword, language, min_price, max_price, name, open_now, rank_by, type, page_token)
354 rank_by=rank_by,
355 type=type,
--> 356 page_token=page_token,
357 )
358

/usr/local/lib/python3.6/dist-packages/googlemaps/places.py in _places(client, url_part, query, location, radius, keyword, language, min_price, max_price, name, open_now, rank_by, type, region, page_token)
406
407 url = "/maps/api/place/%ssearch/json" % url_part
--> 408 return client._request(url, params)
409
410

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
297 return self._request(url, params, first_request_time,
298 retry_counter + 1, base_url, accepts_clientid,
--> 299 extract_body, requests_kwargs, post_json)
300
301 # Check if the time of the nth previous query (where n is

/usr/local/lib/python3.6/dist-packages/googlemaps/client.py in _request(self, url, params, first_request_time, retry_counter, base_url, accepts_clientid, extract_body, requests_kwargs, post_json)
261 elapsed = datetime.now() - first_request_time
262 if elapsed > self.retry_timeout:
--> 263 raise googlemaps.exceptions.Timeout()
264
265 if retry_counter > 0:

Timeout:
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.