Skip to content

Regression

OmeroPy.test.integration.test_tickets1000.TestTicket1000.test880 (from pytest)

Failing for the past 1 build (Since #412 )
Took 41 ms.

Error Message

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

Stacktrace

self = <test.integration.test_tickets1000.TestTicket1000 object at 0x7fdff3bc7390>

    def test880(self):
        try:
>           createTestImage(self.client.sf)

test/integration/test_tickets1000.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/integration/helpers.py:34: in createTestImage
    image = scriptUtil.createNewImage(session, [plane2D], imageName,
../../../../.venv3/lib64/python3.11/site-packages/omero/util/script_utils.py:1347: in createNewImage
    uploadPlane(rawPixelStore, plane2D, theZ, theC, theT)
../../../../.venv3/lib64/python3.11/site-packages/omero/util/script_utils.py:1073: in uploadPlane
    upload_plane(rawPixelsStore, plane, z, c, t)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

raw_pixels_store = 8222be5b-3cb4-4c9a-b1c8-2e15aa264ca9/c82dbb88-e75a-4ff2-8172-5293b2a01c6comero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.11 -p 36999 -t 60000
plane = array([[  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
         13,  14,  15],
       [ 16,  17,  18...8, 239],
       [240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
        253, 254, 255]], dtype=uint8)
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