Skip to content

Failed

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

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

Error Message

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

Stacktrace

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

    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 = 5eaff7ad-1a03-417b-8270-08bce5ae7d18/14d9532c-d2b5-4bbe-bef4-7f542ecb0cbeomero.api.RawPixelsStore -t -e 1.1:tcp -h 172.18.0.12 -p 33635 -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