Skip to content

Failed

OmeroWeb.test.integration.test_api_wells.TestWells.test_plate_wells (from pytest)

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

Error Message

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

Stacktrace

self = <test_api_wells.TestWells object at 0x7f63854068d0>
user1 = (<omero.clients.BaseClient object at 0x7f63849adbd0>, object #0 (::omero::model::Experimenter)
{
    _id = object #1 (...nnotationLinksSeq = 
    {
    }
    _annotationLinksLoaded = False
    _annotationLinksCountPerOwner = 
    {
    }
})

    @pytest.fixture()
    def small_plate(self, user1):
        """
        Create a small plate with 1 row and 2 columns.
    
        Two wells are created, but only the first has any Images (3).
        """
>       return self.create_plate_wells(user1, 1, 2, 0)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test/integration/test_api_wells.py:168: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/integration/test_api_wells.py:145: in create_plate_wells
    image = self.create_test_image(
../../../../.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 = d54e1a0f-f058-4ca4-a71e-0dc780242cd5/8f5a3ae3-23a0-4f49-9fdd-ad1ea8c334b0omero.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