Skip to content

Failed

OmeroWeb.test.integration.test_api_containers.TestContainers.test_pdi_urls (from pytest)

Failing for the past 2 builds (Since #412 )
Took 3.9 sec.

Error Message

failed on setup with "AttributeError: 'numpy.ndarray' object has no attribute 'tostring'"

Stacktrace

self = <test_api_containers.TestContainers object at 0x7f63853d91d0>
user1 = (<omero.clients.BaseClient object at 0x7f6381156f90>, object #0 (::omero::model::Experimenter)
{
    _id = object #1 (...nnotationLinksSeq = 
    {
    }
    _annotationLinksLoaded = False
    _annotationLinksCountPerOwner = 
    {
    }
})

    @pytest.fixture()
    def project_datasets(self, user1):
        """Return Project with Datasets and an orphaned Dataset."""
        # Create and name all the objects
        project = ProjectI()
        project.name = rstring('Project')
    
        # Create 5 Datasets, each with 0-4 images.
        for d in range(5):
            dataset1 = DatasetI()
            dataset1.name = rstring('Dataset%s' % d)
            for i in range(d):
>               image = self.create_test_image(size_x=5, size_y=5,
                                               session=user1[0].getSession(),
                                               name="Image%s" % i)

test/integration/test_api_containers.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.venv3/lib64/python3.11/site-packages/omero/testlib/__init__.py:445: in create_test_image
    script_utils.upload_plane(raw_pixel_store, plane_2d,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

raw_pixels_store = b9f0a77e-7e70-4e7a-a884-f3078ae72d82/c5a37493-76f7-4b0d-a4aa-1f2382a41a4aomero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.12 -p 33635 -t 60000
plane = array([[0, 1, 2, 3, 4],
       [0, 1, 2, 3, 4],
       [0, 1, 2, 3, 4],
       [0, 1, 2, 3, 4],
       [0, 1, 2, 3, 4]], dtype=int16)
z = 0, c = 0, t = 0

    def upload_plane(raw_pixels_store, plane, z, c, t):
        """
        Upload the plane to the server attaching it to the current z,c,t
        of the already instantiated rawPixelStore.
    
        :param raw_pixels_store store pointing to the data.
        :param plane The data to upload
        :param z The Z-Section of the plane.
        :param c The C-Section of the plane.
        :param t The T-Section of the plane.
        """
        byte_swapped_plane = plane.byteswap()
>       converted_plane = byte_swapped_plane.tostring()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'numpy.ndarray' object has no attribute 'tostring'

../../../../.venv3/lib64/python3.11/site-packages/omero/util/script_utils.py:1088: AttributeError