Failed
OmeroPy.test.integration.gatewaytest.test_image.TestImage.testExposureTimeUnits (from pytest)
Error Message
failed on setup with "urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>"
Stacktrace
self = <urllib.request.HTTPSHandler object at 0x7f4b574fff70> http_class = <class 'http.client.HTTPSConnection'> req = <urllib.request.Request object at 0x7f4b57250d90> http_conn_args = {'check_hostname': None, 'context': None} host = 'downloads.openmicroscopy.org' h = <http.client.HTTPSConnection object at 0x7f4b57250a30> def do_open(self, http_class, req, **http_conn_args): """Return an HTTPResponse object for the request, using http_class. http_class must implement the HTTPConnection API from http.client. """ host = req.host if not host: raise URLError('no host given') # will parse host:port h = http_class(host, timeout=req.timeout, **http_conn_args) h.set_debuglevel(self._debuglevel) headers = dict(req.unredirected_hdrs) headers.update({k: v for k, v in req.headers.items() if k not in headers}) # TODO(jhylton): Should this be redesigned to handle # persistent connections? # We want to make an HTTP/1.1 request, but the addinfourl # class isn't prepared to deal with a persistent connection. # It will try to read all remaining data from the socket, # which will block while the server waits for the next request. # So make sure the connection gets closed after the (only) # request. headers["Connection"] = "close" headers = {name.title(): val for name, val in headers.items()} if req._tunnel_host: tunnel_headers = {} proxy_auth_hdr = "Proxy-Authorization" if proxy_auth_hdr in headers: tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr] # Proxy-Authorization should not be sent to origin # server. del headers[proxy_auth_hdr] h.set_tunnel(req._tunnel_host, headers=tunnel_headers) try: try: > h.request(req.get_method(), req.selector, req.data, headers, encode_chunked=req.has_header('Transfer-encoding')) /usr/lib64/python3.9/urllib/request.py:1346: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.9/http/client.py:1285: in request self._send_request(method, url, body, headers, encode_chunked) /usr/lib64/python3.9/http/client.py:1331: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /usr/lib64/python3.9/http/client.py:1280: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib64/python3.9/http/client.py:1040: in _send_output self.send(msg) /usr/lib64/python3.9/http/client.py:980: in send self.connect() /usr/lib64/python3.9/http/client.py:1454: in connect self.sock = self._context.wrap_socket(self.sock, /usr/lib64/python3.9/ssl.py:501: in wrap_socket return self.sslsocket_class._create( /usr/lib64/python3.9/ssl.py:1074: in _create self.do_handshake() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ssl.SSLSocket [closed] fd=-1, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6> block = False @_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None) > self._sslobj.do_handshake() E ConnectionResetError: [Errno 104] Connection reset by peer /usr/lib64/python3.9/ssl.py:1343: ConnectionResetError During handling of the above exception, another exception occurred: request = <SubRequest 'author_testimg' for <Function testExposureTimeUnits>> gatewaywrapper = <omero.gateway.pytest_fixtures.GatewayWrapper object at 0x7f4b5efc15e0> @pytest.fixture(scope='function') def author_testimg(request, gatewaywrapper): """ logs in as Author and returns the test image, creating it first if needed. """ gatewaywrapper.loginAsAuthor() > rv = gatewaywrapper.getTestImage(autocreate=True) ../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/pytest_fixtures.py:81: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/testdb_create.py:150: in getTestImage return dbhelpers.getImage(self.gateway, 'testimg1', forceds=dataset, ../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/dbhelpers.py:501: in getImage i = IMAGES[alias].create() ../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/dbhelpers.py:419: in create fin = urllib.request.urlopen(TESTIMG_URL + self.filename) /usr/lib64/python3.9/urllib/request.py:214: in urlopen return opener.open(url, data, timeout) /usr/lib64/python3.9/urllib/request.py:517: in open response = self._open(req, data) /usr/lib64/python3.9/urllib/request.py:534: in _open result = self._call_chain(self.handle_open, protocol, protocol + /usr/lib64/python3.9/urllib/request.py:494: in _call_chain result = func(*args) /usr/lib64/python3.9/urllib/request.py:1389: in https_open return self.do_open(http.client.HTTPSConnection, req, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib.request.HTTPSHandler object at 0x7f4b574fff70> http_class = <class 'http.client.HTTPSConnection'> req = <urllib.request.Request object at 0x7f4b57250d90> http_conn_args = {'check_hostname': None, 'context': None} host = 'downloads.openmicroscopy.org' h = <http.client.HTTPSConnection object at 0x7f4b57250a30> def do_open(self, http_class, req, **http_conn_args): """Return an HTTPResponse object for the request, using http_class. http_class must implement the HTTPConnection API from http.client. """ host = req.host if not host: raise URLError('no host given') # will parse host:port h = http_class(host, timeout=req.timeout, **http_conn_args) h.set_debuglevel(self._debuglevel) headers = dict(req.unredirected_hdrs) headers.update({k: v for k, v in req.headers.items() if k not in headers}) # TODO(jhylton): Should this be redesigned to handle # persistent connections? # We want to make an HTTP/1.1 request, but the addinfourl # class isn't prepared to deal with a persistent connection. # It will try to read all remaining data from the socket, # which will block while the server waits for the next request. # So make sure the connection gets closed after the (only) # request. headers["Connection"] = "close" headers = {name.title(): val for name, val in headers.items()} if req._tunnel_host: tunnel_headers = {} proxy_auth_hdr = "Proxy-Authorization" if proxy_auth_hdr in headers: tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr] # Proxy-Authorization should not be sent to origin # server. del headers[proxy_auth_hdr] h.set_tunnel(req._tunnel_host, headers=tunnel_headers) try: try: h.request(req.get_method(), req.selector, req.data, headers, encode_chunked=req.has_header('Transfer-encoding')) except OSError as err: # timeout error > raise URLError(err) E urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer> /usr/lib64/python3.9/urllib/request.py:1349: URLError