Skip to content

Regression

OmeroWeb.test.integration.test_thumbnails.TestThumbnails.test_base64_thumb_set (from pytest)

Failing for the past 1 build (Since #412 )
Took 0.14 sec.

Error Message

AttributeError: 'numpy.ndarray' object has no attribute 'tostring'

Stacktrace

self = <test_thumbnails.TestThumbnails object at 0x7ff4d0b6d090>

    def test_base64_thumb_set(self):
        """
        Test base64 encoded retrival of thumbnails in a batch
        """
        # Create a square image
        images = []
        for i in range(2, 5):
>           iid = self.create_test_image(size_x=64*i, size_y=64*i,
                                         session=self.sf).id.val

test/integration/test_thumbnails.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.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 = 066efdf9-7824-4229-81d2-e0cbd1da9615/d2ca6657-40b8-4c82-a0ea-ad4689ad2286omero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.11 -p 36999 -t 60000
plane = array([[  0,   1,   2, ..., 125, 126, 127],
       [  0,   1,   2, ..., 125, 126, 127],
       [  0,   1,   2, ..., 12...       [  0,   1,   2, ..., 125, 126, 127],
       [  0,   1,   2, ..., 125, 126, 127]], shape=(128, 128), 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