Timed out - Running example python notebooks

31 views
Skip to first unread message

Julian Biltes

unread,
Aug 26, 2020, 2:12:00 PM8/26/20
to ISRIC - World Soil Information

Hi, i'm running this notebook without modify https://git.wur.nl/isric/soilgrids/soilgrids.notebooks/-/blob/master/02-WCS-getExtent.ipynb

But it's not work, i get timed out in getCoverage and i dont understand the reason.

response = wcs.getCoverage( identifier='phh2o_0-5cm_mean', crs='urn:ogc:def:crs:EPSG::152160', bbox=bbox, resx=250, resy=250, format='GEOTIFF_INT16')

I tried with all url exposed here https://maps.isric.org but none of them works for me. Any ideas?

Error obtained:

timeout Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
383 # otherwise it looks like a programming error was the cause.
--> 384 six.raise_from(e, None)
385 except (SocketTimeout, BaseSSLError, SocketError) as e:

~/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in raise_from(value, from_value)

~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
379 try:
--> 380 httplib_response = conn.getresponse()
381 except Exception as e:

~/anaconda3/lib/python3.7/http/client.py in getresponse(self)
1335 try:
-> 1336 response.begin()
1337 except ConnectionError:

~/anaconda3/lib/python3.7/http/client.py in begin(self)
305 while True:
--> 306 version, status, reason = self._read_status()
307 if status != CONTINUE:

~/anaconda3/lib/python3.7/http/client.py in _read_status(self)
266 def _read_status(self):
--> 267 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
268 if len(line) > _MAXLINE:

~/anaconda3/lib/python3.7/socket.py in readinto(self, b)
588 try:
--> 589 return self._sock.recv_into(b)
590 except timeout:

~/anaconda3/lib/python3.7/ssl.py in recv_into(self, buffer, nbytes, flags)
1070 self.class)
-> 1071 return self.read(nbytes, buffer)
1072 else:

~/anaconda3/lib/python3.7/ssl.py in read(self, len, buffer)
928 if buffer is not None:
--> 929 return self._sslobj.read(len, buffer)
930 else:

timeout: The read operation timed out

During handling of the above exception, another exception occurred:

ReadTimeoutError Traceback (most recent call last)
~/anaconda3/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
448 retries=self.max_retries,
--> 449 timeout=timeout
450 )

~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
637 retries = retries.increment(method, url, error=e, _pool=self,
--> 638 _stacktrace=sys.exc_info()[2])
639 retries.sleep()

~/anaconda3/lib/python3.7/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
367 if read is False or not self._is_method_retryable(method):
--> 368 raise six.reraise(type(error), error, _stacktrace)
369 elif read is not None:

~/anaconda3/lib/python3.7/site-packages/urllib3/packages/six.py in reraise(tp, value, tb)
685 raise value.with_traceback(tb)
--> 686 raise value
687

~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
599 body=body, headers=headers,
--> 600 chunked=chunked)
601

~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
385 except (SocketTimeout, BaseSSLError, SocketError) as e:
--> 386 self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
387 raise

~/anaconda3/lib/python3.7/site-packages/urllib3/connectionpool.py in _raise_timeout(self, err, url, timeout_value)
305 if isinstance(err, SocketTimeout):
--> 306 raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
307

ReadTimeoutError: HTTPSConnectionPool(host='dev-maps.isric.org', port=443): Read timed out. (read timeout=30)

During handling of the above exception, another exception occurred:

ReadTimeout Traceback (most recent call last)
in
4 bbox=bbox,
5 resx=250, resy=250,
----> 6 format='GEOTIFF_INT16')

~/anaconda3/lib/python3.7/site-packages/owslib/coverage/wcs100.py in getCoverage(self, identifier, bbox, time, format, crs, width, height, resx, resy, resz, parameter, method, **kwargs)
155 log.debug('WCS 1.0.0 DEBUG: Second part of URL: %s' % data)
156
--> 157 u = openURL(base_url, data, method, self.cookies, auth=self.auth)
158 return u
159

~/anaconda3/lib/python3.7/site-packages/owslib/util.py in openURL(url_base, data, method, cookies, username, password, timeout, headers, verify, cert, auth)
201 rkwargs['cookies'] = cookies
202
--> 203 req = requests.request(method.upper(), url_base, headers=headers, **rkwargs)
204
205 if req.status_code in [400, 401]:

~/anaconda3/lib/python3.7/site-packages/requests/api.py in request(method, url, **kwargs)
59 # cases, and look like a memory leak in others.
60 with sessions.Session() as session:
---> 61 return session.request(method=method, url=url, **kwargs)
62
63

~/anaconda3/lib/python3.7/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
528 }
529 send_kwargs.update(settings)
--> 530 resp = self.send(prep, **send_kwargs)
531
532 return resp

~/anaconda3/lib/python3.7/site-packages/requests/sessions.py in send(self, request, **kwargs)
641
642 # Send the request
--> 643 r = adapter.send(request, **kwargs)
644
645 # Total elapsed time of the request (approximately)

~/anaconda3/lib/python3.7/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
527 raise SSLError(e, request=request)
528 elif isinstance(e, ReadTimeoutError):
--> 529 raise ReadTimeout(e, request=request)
530 else:
531 raise

ReadTimeout: HTTPSConnectionPool(host='dev-maps.isric.org', port=443): Read timed out. (read timeout=30)

Thanks

Reply all
Reply to author
Forward
0 new messages