Skip to content

Failed

OmeroPy.test.integration.test_render.TestRendering.test_render_region (from pytest)

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

Error Message

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

Stacktrace

self = <test.integration.test_render.TestRendering object at 0x7fc474614210>

    def test_render_region(self):
        """
        Test attempts to compare a full image plane, cropped to a region, with
        a region retrieved from rendering engine.
    
        Uses PIL to convert compressed strings into 2D numpy arrays for
        cropping and comparison.
        """
    
        session = self.root.sf
    
        size_x = 4
        size_y = 3
        size_z = 1
        size_c = 1
        size_t = 1
>       image = self.create_test_image(size_x, size_y, size_z, size_c, size_t)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test/integration/test_render.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.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 = 70457d70-ceb2-436c-8c4f-d9338a12208f/20060922-b75a-424c-8e24-f6391c8da3b0omero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.12 -p 33635 -t 60000
plane = array([[0, 1, 2, 3],
       [0, 1, 2, 3],
       [0, 1, 2, 3]], 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