googlemaps / googlemaps/google-maps-services-python

Error about [urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))]

Abierto
#496 1 comentario 0 reacciones 1 asignado Reclamado por @wangela Ver en GitHub
triage me type: question
Lenguaje dominante
Python
Estrellas
5k
Forks
1.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**PLEASE READ**

If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/). This will ensure a timely response.

Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform [support resources page](https://developers.google.com/maps/support/).

If your bug or feature request is not related to this particular library, please visit the Google Maps Platform [issue trackers](https://developers.google.com/maps/support/#issue_tracker).

Check for answers on StackOverflow with the [google-maps](http://stackoverflow.com/questions/tagged/google-maps) tag.

---

The request in my code is:

vivo_client = googlemaps.Client(key='AIzaSyB9ZFOSv4U-QMJ-I-IeeVGRZf1zy_Im0iQ')
cell_info = [{'cellId': 12828875, 'locationAreaCode': 43531, 'mobileCountryCode': 502, 'mobileNetworkCode': 16}]
lat_lng_dict = geolocation.geolocate(client=vivo_client, cell_towers=cell_info)

All error message are like below, In my opinion, this problem is about handshaking failed with Google server.

Please help me about this problem. Thanks a lot.

--------------------------------
Traceback (most recent call last):
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 1041, in _create
self.do_handshake()
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 1310, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\util\retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
raise value.with_traceback(tb)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 1041, in _create
self.do_handshake()
File "F:\ANACONDA\envs\Google_Cell_LatLongitude_Decode\lib\ssl.py", line 1310, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\googlemaps\client.py", line 315, in _request
response = requests_method(base_url + authed_url,
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\requests\sessions.py", line 590, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\requests\adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\Cell_Decode.py", line 102, in
lat_lng_dict = geolocation.geolocate(client=vivo_client, cell_towers=cell_info)
File "F:\ANACONDA\Lib\site-packages\googlemaps\geolocation.py", line 104, in geolocate
return client._request("/geolocation/v1/geolocate", {}, # No GET params
File "D:\Users\11137018\PycharmProjects\Google_Cell_LatLongitude_Decode\googlemaps\client.py", line 320, in _request
raise googlemaps.exceptions.TransportError(e)
googlemaps.exceptions.TransportError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))
------------------------------------

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.