googlemaps / googlemaps/google-maps-services-python

Timeout when trying to process nearby search request

Ouverte
#377 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
triage me type: bug
Langage dominant
Python
Étoiles
5k
Forks
1.4k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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:
```

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.