Bounds: (122.088628, -26.019766, 123.846735, -24.988548)
---------------------------------------------------------------------------
TimeoutError Traceback (most recent call last)
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:1354, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args)
1353 try:
-> 1354 h.request(req.get_method(), req.selector, req.data, headers,
1355 encode_chunked=req.has_header('Transfer-encoding'))
1356 except OSError as err: # timeout error
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:1256, in HTTPConnection.request(self, method, url, body, headers, encode_chunked)
1255 """Send a complete request to the server."""
-> 1256 self._send_request(method, url, body, headers, encode_chunked)
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:1302, in HTTPConnection._send_request(self, method, url, body, headers, encode_chunked)
1301 body = _encode(body, 'body')
-> 1302 self.endheaders(body, encode_chunked=encode_chunked)
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:1251, in HTTPConnection.endheaders(self, message_body, encode_chunked)
1250 raise CannotSendHeader()
-> 1251 self._send_output(message_body, encode_chunked=encode_chunked)
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:1011, in HTTPConnection._send_output(self, message_body, encode_chunked)
1010 del self._buffer[:]
-> 1011 self.send(msg)
1013 if message_body is not None:
1014
1015 # create a consistent interface to message_body
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:951, in HTTPConnection.send(self, data)
950 if self.auto_open:
--> 951 self.connect()
952 else:
File ~/anaconda3/envs/xarray/lib/python3.8/http/client.py:922, in HTTPConnection.connect(self)
921 """Connect to the host and port specified in __init__."""
--> 922 self.sock = self._create_connection(
923 (self.host,self.port), self.timeout, self.source_address)
924 self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
File ~/anaconda3/envs/xarray/lib/python3.8/socket.py:808, in create_connection(address, timeout, source_address)
807 try:
--> 808 raise err
809 finally:
810 # Break explicitly a reference cycle
File ~/anaconda3/envs/xarray/lib/python3.8/socket.py:796, in create_connection(address, timeout, source_address)
795 sock.bind(source_address)
--> 796 sock.connect(sa)
797 # Break explicitly a reference cycle
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
Input In [7], in <cell line: 2>()
1 bounds=GeoJSON(data=dc.last_draw)
----> 2 wamex.get_reports (bounds)
File ~/.local/lib/python3.8/site-packages/dh2loop-0.0.1-py3.8.egg/dh2loop/wamex.py:189, in get_reports(bounds)
185 """
186 Downloads reports from a defined region
187 """
188 bbox, bbox2, bounds2 =define_bounds(bounds)
--> 189 anumberscode=query_anumbers(bbox, bbox2, bounds2)
190 if not anumberscode:
191 print ("No reports available in this region")
File ~/.local/lib/python3.8/site-packages/dh2loop-0.0.1-py3.8.egg/dh2loop/wamex.py:90, in query_anumbers(bbox, bbox2, bounds2)
88 try:
89 collars_file='http://geo.loop-gis.org/geoserver/loop/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=loop:collar_4326&bbox='+bbox2+'&srs=EPSG:4326'
---> 90 collars = gpd.read_file(collars_file, bbox=bbox)
91 print("Connected to Loop Server")
92 anumbers=gpd.GeoDataFrame(collars, columns=["anumber"])
File ~/anaconda3/envs/xarray/lib/python3.8/site-packages/geopandas/io/file.py:242, in _read_file(filename, bbox, mask, rows, engine, **kwargs)
240 from_bytes = False
241 if _is_url(filename):
--> 242 req = _urlopen(filename)
243 path_or_bytes = req.read()
244 from_bytes = True
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:222, in urlopen(url, data, timeout, cafile, capath, cadefault, context)
220 else:
221 opener = _opener
--> 222 return opener.open(url, data, timeout)
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:525, in OpenerDirector.open(self, fullurl, data, timeout)
522 req = meth(req)
524 sys.audit('urllib.Request', req.full_url, req.data, req.headers, req.get_method())
--> 525 response = self._open(req, data)
527 # post-process response
528 meth_name = protocol+"_response"
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:542, in OpenerDirector._open(self, req, data)
539 return result
541 protocol = req.type
--> 542 result = self._call_chain(self.handle_open, protocol, protocol +
543 '_open', req)
544 if result:
545 return result
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:502, in OpenerDirector._call_chain(self, chain, kind, meth_name, *args)
500 for handler in handlers:
501 func = getattr(handler, meth_name)
--> 502 result = func(*args)
503 if result is not None:
504 return result
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:1383, in HTTPHandler.http_open(self, req)
1382 def http_open(self, req):
-> 1383 return self.do_open(http.client.HTTPConnection, req)
File ~/anaconda3/envs/xarray/lib/python3.8/urllib/request.py:1357, in AbstractHTTPHandler.do_open(self, http_class, req, **http_conn_args)
1354 h.request(req.get_method(), req.selector, req.data, headers,
1355 encode_chunked=req.has_header('Transfer-encoding'))
1356 except OSError as err: # timeout error
-> 1357 raise URLError(err)
1358 r = h.getresponse()
1359 except:
URLError: <urlopen error [Errno 110] Connection timed out>