Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- TimeoutError Traceback (most recent call last)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:449, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
- 445 except BaseException as e:
- 446 # Remove the TypeError from the exception chain in
- 447 # Python 3 (including for exceptions like SystemExit).
- 448 # Otherwise it looks like a bug in the code.
- --> 449 six.raise_from(e, None)
- 450 except (SocketTimeout, BaseSSLError, SocketError) as e:
- File <string>:3, in raise_from(value, from_value)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:444, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
- 443 try:
- --> 444 httplib_response = conn.getresponse()
- 445 except BaseException as e:
- 446 # Remove the TypeError from the exception chain in
- 447 # Python 3 (including for exceptions like SystemExit).
- 448 # Otherwise it looks like a bug in the code.
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py:1374, in HTTPConnection.getresponse(self)
- 1373 try:
- -> 1374 response.begin()
- 1375 except ConnectionError:
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py:318, in HTTPResponse.begin(self)
- 317 while True:
- --> 318 version, status, reason = self._read_status()
- 319 if status != CONTINUE:
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py:279, in HTTPResponse._read_status(self)
- 278 def _read_status(self):
- --> 279 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
- 280 if len(line) > _MAXLINE:
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py:706, in SocketIO.readinto(self, b)
- 705 try:
- --> 706 return self._sock.recv_into(b)
- 707 except timeout:
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py:1278, in SSLSocket.recv_into(self, buffer, nbytes, flags)
- 1275 raise ValueError(
- 1276 "non-zero flags not allowed in calls to recv_into() on %s" %
- 1277 self.__class__)
- -> 1278 return self.read(nbytes, buffer)
- 1279 else:
- File /usr/local/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py:1134, in SSLSocket.read(self, len, buffer)
- 1133 if buffer is not None:
- -> 1134 return self._sslobj.read(len, buffer)
- 1135 else:
- TimeoutError: The read operation timed out
- During handling of the above exception, another exception occurred:
- ReadTimeoutError Traceback (most recent call last)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:703, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
- 702 # Make the request on the httplib connection object.
- --> 703 httplib_response = self._make_request(
- 704 conn,
- 705 method,
- 706 url,
- 707 timeout=timeout_obj,
- 708 body=body,
- 709 headers=headers,
- 710 chunked=chunked,
- 711 )
- 713 # If we're going to release the connection in ``finally:``, then
- 714 # the response doesn't need to know about the connection. Otherwise
- 715 # it will also try to release it and we'll have a double-release
- 716 # mess.
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:451, in HTTPConnectionPool._make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
- 450 except (SocketTimeout, BaseSSLError, SocketError) as e:
- --> 451 self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
- 452 raise
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:340, in HTTPConnectionPool._raise_timeout(self, err, url, timeout_value)
- 339 if isinstance(err, SocketTimeout):
- --> 340 raise ReadTimeoutError(
- 341 self, url, "Read timed out. (read timeout=%s)" % timeout_value
- 342 )
- 344 # See the above comment about EAGAIN in Python 3. In Python 2 we have
- 345 # to specifically catch it and throw the timeout error
- ReadTimeoutError: HTTPSConnectionPool(host='photon.komoot.io', port=443): Read timed out. (read timeout=1)
- During handling of the above exception, another exception occurred:
- MaxRetryError Traceback (most recent call last)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/requests/adapters.py:489, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
- 488 if not chunked:
- --> 489 resp = conn.urlopen(
- 490 method=request.method,
- 491 url=url,
- 492 body=request.body,
- 493 headers=request.headers,
- 494 redirect=False,
- 495 assert_same_host=False,
- 496 preload_content=False,
- 497 decode_content=False,
- 498 retries=self.max_retries,
- 499 timeout=timeout,
- 500 )
- 502 # Send the request.
- 503 else:
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:815, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
- 812 log.warning(
- 813 "Retrying (%r) after connection broken by '%r': %s", retries, err, url
- 814 )
- --> 815 return self.urlopen(
- 816 method,
- 817 url,
- 818 body,
- 819 headers,
- 820 retries,
- 821 redirect,
- 822 assert_same_host,
- 823 timeout=timeout,
- 824 pool_timeout=pool_timeout,
- 825 release_conn=release_conn,
- 826 chunked=chunked,
- 827 body_pos=body_pos,
- 828 **response_kw
- 829 )
- 831 # Handle redirect?
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:815, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
- 812 log.warning(
- 813 "Retrying (%r) after connection broken by '%r': %s", retries, err, url
- 814 )
- --> 815 return self.urlopen(
- 816 method,
- 817 url,
- 818 body,
- 819 headers,
- 820 retries,
- 821 redirect,
- 822 assert_same_host,
- 823 timeout=timeout,
- 824 pool_timeout=pool_timeout,
- 825 release_conn=release_conn,
- 826 chunked=chunked,
- 827 body_pos=body_pos,
- 828 **response_kw
- 829 )
- 831 # Handle redirect?
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/connectionpool.py:787, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
- 785 e = ProtocolError("Connection aborted.", e)
- --> 787 retries = retries.increment(
- 788 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
- 789 )
- 790 retries.sleep()
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/urllib3/util/retry.py:592, in Retry.increment(self, method, url, response, error, _pool, _stacktrace)
- 591 if new_retry.is_exhausted():
- --> 592 raise MaxRetryError(_pool, url, error or ResponseError(cause))
- 594 log.debug("Incremented Retry for (url='%s'): %r", url, new_retry)
- MaxRetryError: HTTPSConnectionPool(host='photon.komoot.io', port=443): Max retries exceeded with url: /api?q=SOME+ADRRESS%2C+Habana%2C+Cuba&limit=1 (Caused by ReadTimeoutError("HTTPSConnectionPool(host='photon.komoot.io', port=443): Read timed out. (read timeout=1)"))
- During handling of the above exception, another exception occurred:
- ConnectionError Traceback (most recent call last)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopy/adapters.py:457, in RequestsAdapter._request(self, url, timeout, headers)
- 456 try:
- --> 457 resp = self.session.get(url, timeout=timeout, headers=headers)
- 458 except Exception as error:
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/requests/sessions.py:600, in Session.get(self, url, **kwargs)
- 599 kwargs.setdefault("allow_redirects", True)
- --> 600 return self.request("GET", url, **kwargs)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/requests/sessions.py:587, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
- 586 send_kwargs.update(settings)
- --> 587 resp = self.send(prep, **send_kwargs)
- 589 return resp
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/requests/sessions.py:701, in Session.send(self, request, **kwargs)
- 700 # Send the request
- --> 701 r = adapter.send(request, **kwargs)
- 703 # Total elapsed time of the request (approximately)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/requests/adapters.py:565, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
- 563 raise SSLError(e, request=request)
- --> 565 raise ConnectionError(e, request=request)
- 567 except ClosedPoolError as e:
- ConnectionError: HTTPSConnectionPool(host='photon.komoot.io', port=443): Max retries exceeded with url: /api?q=q=SOME+ADRRESS%2C+Habana%2C+Cuba&limit=1 (Caused by ReadTimeoutError("HTTPSConnectionPool(host='photon.komoot.io', port=443): Read timed out. (read timeout=1)"))
- During handling of the above exception, another exception occurred:
- GeocoderUnavailable Traceback (most recent call last)
- Cell In[63], line 1
- ----> 1 state_srl_locations = gpd.tools.geocode(df_state_srl['DIRECCION'],
- 2 provider=Photon)
- 3 state_srl_locations
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopandas/tools/geocoding.py:67, in geocode(strings, provider, **kwargs)
- 64 provider = "photon"
- 65 throttle_time = _get_throttle_time(provider)
- ---> 67 return _query(strings, True, provider, throttle_time, **kwargs)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopandas/tools/geocoding.py:141, in _query(data, forward, provider, throttle_time, **kwargs)
- 139 try:
- 140 if forward:
- --> 141 results[i] = coder.geocode(s)
- 142 else:
- 143 results[i] = coder.reverse((s.y, s.x), exactly_one=True)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopy/geocoders/photon.py:166, in Photon.geocode(self, query, exactly_one, timeout, location_bias, language, limit, osm_tag, bbox)
- 164 logger.debug("%s.geocode: %s", self.__class__.__name__, url)
- 165 callback = partial(self._parse_json, exactly_one=exactly_one)
- --> 166 return self._call_geocoder(url, callback, timeout=timeout)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopy/geocoders/base.py:368, in Geocoder._call_geocoder(self, url, callback, timeout, is_json, headers)
- 366 try:
- 367 if is_json:
- --> 368 result = self.adapter.get_json(url, timeout=timeout, headers=req_headers)
- 369 else:
- 370 result = self.adapter.get_text(url, timeout=timeout, headers=req_headers)
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopy/adapters.py:447, in RequestsAdapter.get_json(self, url, timeout, headers)
- 446 def get_json(self, url, *, timeout, headers):
- --> 447 resp = self._request(url, timeout=timeout, headers=headers)
- 448 try:
- 449 return resp.json()
- File /usr/local/Cellar/jupyterlab/3.6.1/libexec/lib/python3.11/site-packages/geopy/adapters.py:469, in RequestsAdapter._request(self, url, timeout, headers)
- 467 raise GeocoderServiceError(message)
- 468 else:
- --> 469 raise GeocoderUnavailable(message)
- 470 elif isinstance(error, requests.Timeout):
- 471 raise GeocoderTimedOut("Service timed out")
- GeocoderUnavailable: HTTPSConnectionPool(host='photon.komoot.io', port=443): Max retries exceeded with url: /api?q=SOME+ADRRESS%2C+Habana%2C+Cuba&limit=1 (Caused by ReadTimeoutError("HTTPSConnectionPool(host='photon.komoot.io', port=443): Read timed out. (read timeout=1)"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement