Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sk502887185 opened this issue Jul 24, 2023 · 1 comment
Assignees
Labels
triage me I really want to be triaged. type: question Request for information or clarification. Not an issue.

Comments

@sk502887185
Copy link

PLEASE READ

If you have a support contract with Google, please create an issue in the support console. 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.

If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.

Check for answers on StackOverflow with the 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))

@sk502887185 sk502887185 added triage me I really want to be triaged. type: question Request for information or clarification. Not an issue. labels Jul 24, 2023
@wangela
Copy link
Member

wangela commented Jul 24, 2023

If you would like to upvote the priority of this issue, please comment below or react with 👍 so we can see what is popular when we triage.

@sk502887185 Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants