Skip to content

Regression

OmeroPy.test.integration.test_thumbnailPerms.TestThumbnailPerms.testThumbs (from pytest)

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

Error Message

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

Stacktrace

self = <test.integration.test_thumbnailPerms.TestThumbnailPerms object at 0x7fdffd14d3d0>

    def testThumbs(self):
    
        privateGroup = self.new_group(perms='rw----')
        readOnlyGroup = self.new_group(perms='rwr---')
        collaborativeGroup = self.new_group(perms='rwra--')
    
        # new user (group owner)
        newOwner = self.new_user(group=privateGroup)
        self.add_groups(newOwner, [readOnlyGroup, collaborativeGroup],
                        owner=True)
    
        # new user1
        user1 = self.new_user(group=privateGroup)
        self.add_groups(user1, [readOnlyGroup, collaborativeGroup])
    
        # new user2
        user2 = self.new_user(group=privateGroup)
        self.add_groups(user2, [readOnlyGroup, collaborativeGroup])
    
        # login as user1 (into their default group)
        # create image in private group
        client_share1 = self.new_client(
            user=user1, password=user1.omeName.val)
>       privateImageId = createTestImage(client_share1.sf)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

test/integration/test_thumbnailPerms.py:63: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
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 = f64f74da-ef88-42e4-a364-babad059e0ef/44b6a604-6f27-4074-8273-a236c4a6cb88omero.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