Skip to content

Failed

OmeroPy.test.integration.gatewaytest.test_image.TestImage.testRenderJpegRegion (from pytest)

Failing for the past 2 builds (Since #184 )
Took 0.13 sec.

Error Message

failed on setup with "OSError: No such file /home/omero/workspace/OMERO-test-integration/.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/CHOBI_d3d.dv"

Stacktrace

self = <omero.gateway.scripts.dbhelpers.ImageEntry object at 0x7f0a5c6b72e0>

    def create(self):
        if isinstance(self.dataset, str):
            dataset = DATASETS[self.dataset]
            project = PROJECTS[dataset.project]
            client = USERS[project.owner].login()
            dataset = dataset.get(client)
        else:
            dataset = self.dataset
            client = dataset._conn
        i = self.get(client, dataset)
        if i is not None:
            # print ".. -> image already exists: %s" % self.name
            return i
        # print ".. -> create new image: %s" % self.name
        sys.stderr.write('I')
        if self.filename is False:
            UserEntry.setGroupForSession(
                client, dataset.getDetails().getGroup().getName())
            self._createWithoutPixels(client, dataset)
            return self.get(client, dataset)
        fpath = os.path.join(BASEPATH, self.filename)
        if not os.path.exists(fpath):
            if not os.path.exists(os.path.dirname(fpath)):
                os.makedirs(os.path.dirname(fpath))
            if self.filename.endswith('.fake'):
                # If it's a .fake file, simply create it
                os.close(os.open(fpath, os.O_CREAT | os.O_EXCL))
            else:
                # First try to download the image
                try:
                    # print "Trying to get test image from " + TESTIMG_URL +
                    # self.filename
                    sys.stderr.write('<')
>                   fin = urllib.request.urlopen(TESTIMG_URL + self.filename)

../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/dbhelpers.py:419: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.9/urllib/request.py:214: in urlopen
    return opener.open(url, data, timeout)
/usr/lib64/python3.9/urllib/request.py:523: in open
    response = meth(req, response)
/usr/lib64/python3.9/urllib/request.py:632: in http_response
    response = self.parent.error(
/usr/lib64/python3.9/urllib/request.py:561: in error
    return self._call_chain(*args)
/usr/lib64/python3.9/urllib/request.py:494: in _call_chain
    result = func(*args)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib.request.HTTPDefaultErrorHandler object at 0x7f0a79c5ccd0>
req = <urllib.request.Request object at 0x7f0a909a3790>
fp = <http.client.HTTPResponse object at 0x7f0a8b6589a0>, code = 403
msg = 'Forbidden', hdrs = <http.client.HTTPMessage object at 0x7f0a58b00e50>

    def http_error_default(self, req, fp, code, msg, hdrs):
>       raise HTTPError(req.full_url, code, msg, hdrs, fp)
E       urllib.error.HTTPError: HTTP Error 403: Forbidden

/usr/lib64/python3.9/urllib/request.py:641: HTTPError

During handling of the above exception, another exception occurred:

request = <SubRequest 'author_testimg' for <Function testRenderJpegRegion>>
gatewaywrapper = <omero.gateway.pytest_fixtures.GatewayWrapper object at 0x7f0a72a70430>

    @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()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <omero.gateway.scripts.dbhelpers.ImageEntry object at 0x7f0a5c6b72e0>

    def create(self):
        if isinstance(self.dataset, str):
            dataset = DATASETS[self.dataset]
            project = PROJECTS[dataset.project]
            client = USERS[project.owner].login()
            dataset = dataset.get(client)
        else:
            dataset = self.dataset
            client = dataset._conn
        i = self.get(client, dataset)
        if i is not None:
            # print ".. -> image already exists: %s" % self.name
            return i
        # print ".. -> create new image: %s" % self.name
        sys.stderr.write('I')
        if self.filename is False:
            UserEntry.setGroupForSession(
                client, dataset.getDetails().getGroup().getName())
            self._createWithoutPixels(client, dataset)
            return self.get(client, dataset)
        fpath = os.path.join(BASEPATH, self.filename)
        if not os.path.exists(fpath):
            if not os.path.exists(os.path.dirname(fpath)):
                os.makedirs(os.path.dirname(fpath))
            if self.filename.endswith('.fake'):
                # If it's a .fake file, simply create it
                os.close(os.open(fpath, os.O_CREAT | os.O_EXCL))
            else:
                # First try to download the image
                try:
                    # print "Trying to get test image from " + TESTIMG_URL +
                    # self.filename
                    sys.stderr.write('<')
                    fin = urllib.request.urlopen(TESTIMG_URL + self.filename)
                    with open(fpath, 'wb') as fout:
                        fout.write(fin.read())
                except urllib.error.HTTPError:
>                   raise IOError('No such file %s' % fpath)
E                   OSError: No such file /home/omero/workspace/OMERO-test-integration/.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/CHOBI_d3d.dv

../../../../.venv3/lib64/python3.9/site-packages/omero/gateway/scripts/dbhelpers.py:423: OSError