<caseResult _class='hudson.tasks.junit.CaseResult'><age>1</age><className>OmeroPy.test.integration.gatewaytest.test_get_objects.TestGetObject</className><duration>3.605</duration><errorDetails>AttributeError: 'NoneType' object has no attribute 'id'</errorDetails><errorStackTrace>self = &lt;test.integration.gatewaytest.test_get_objects.TestGetObject object at 0x7f4747e5f150&gt;

    def testGetObjectsAnnotation(self):
    
        # create new group and user - don't rely on existing test user/group
    
        group = self.new_group(perms='rwra--')
        client, user = self.new_client_and_user(group=group)
    
        conn = BlitzGateway(client_obj=client)
    
        ann_types = ["CommentAnnotation", "TagAnnotation",
                     "LongAnnotation", "XmlAnnotation",
                     "DoubleAnnotation", "BooleanAnnotation",
                     "TimestampAnnotation", "TermAnnotation"]
        ns = "test_get_objects_namespace"
        ns_map = "test_get_objects_map_namespace"
        ns_file = "test_get_objects_annotation_file"
    
        def create_dataset_with_annotations(name, dtype="Dataset"):
            if dtype == "Dataset":
                obj = DatasetI()
                wrapper = omero.gateway.DatasetWrapper(conn, obj)
            elif dtype == "Project":
                obj = ProjectI()
                wrapper = omero.gateway.ProjectWrapper(conn, obj)
            wrapper.setName(name)
            wrapper.save()
    
            # Create total of 10 annotations on the object...
            # create Comment, Tag, Xml, etc
            for ann_type in ann_types:
                ann = getattr(omero.gateway, ann_type + "Wrapper")(conn)
                ann.setNs(ns)
                if ann_type in ("LongAnnotation", "DoubleAnnotation",
                                "TimestampAnnotation"):
                    ann.setValue(100.0)
                elif ann_type == "BooleanAnnotation":
                    ann.setValue(True)
                else:
                    ann.setValue("Test %s: %s" % (ann_type, name))
                wrapper.linkAnnotation(ann)
    
            # create MapAnnotation
            mapAnn = omero.gateway.MapAnnotationWrapper(conn)
            mapAnn.setNs(ns)
            mapAnn.setValue([("key1", "value1"), ("key2", "value2")])
            mapAnn.setNs(ns_map)
            mapAnn.save()
            wrapper.linkAnnotation(mapAnn)
    
            # create FileAnnotation
            fileAnn = omero.gateway.FileAnnotationWrapper(conn)
            fileObj = omero.model.OriginalFileI()
            fileObj = omero.gateway.OriginalFileWrapper(conn, fileObj)
            fileObj.setName(omero.rtypes.rstring('fileName'))
            fileObj.setPath(omero.rtypes.rstring('path/to/file'))
            fileObj.setHash(omero.rtypes.rstring('a'))
            fileObj.setSize(omero.rtypes.rlong(0))
            fileObj.save()
            fileAnn.setFile(fileObj)
            fileAnn.setNs(ns_file)
            fileAnn.save()
            wrapper.linkAnnotation(fileAnn)
    
            return wrapper
    
        dataset1 = create_dataset_with_annotations("Dataset 1")
        dataset2 = create_dataset_with_annotations("Dataset 2")
        create_dataset_with_annotations("Project 1", dtype="Project")
    
        # Add Tag to Group
        tag = omero.gateway.TagAnnotationWrapper(conn)
        tag.setNs("test_get_objects_group_tag")
        tag.setValue("Test Tag on Group")
        group = conn.getGroupFromContext()
&gt;       group.linkAnnotation(tag)

test/integration/gatewaytest/test_get_objects.py:725: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../.venv3/lib64/python3.11/site-packages/omero/gateway/__init__.py:1133: in linkAnnotation
    ann = self._linkAnnotation(ann)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../.venv3/lib64/python3.11/site-packages/omero/gateway/__init__.py:1065: in _linkAnnotation
    return self._linkObject(ann, "%sAnnotationLinkI" % self.OMERO_CLASS)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = &lt;_ExperimenterGroupWrapper id=2745&gt;
obj = &lt;omero.gateway.TagAnnotationWrapper object at 0x7f4731e456d0&gt;
lnkobjtype = 'ExperimenterGroupAnnotationLinkI'

    def _linkObject(self, obj, lnkobjtype):
        """
        Saves the object to DB if needed - setting the permissions manually.
        Creates the object link and saves it, setting permissions manually.
        TODO: Can't set permissions manually in 4.2
            - Assumes world &amp; group writable
    
        :param obj:     The object to link
        :type obj:      :class:`BlitzObjectWrapper`
        """
        ctx = self._conn.SERVICE_OPTS.copy()
&gt;       ctx.setOmeroGroup(self.details.group.id.val)
                          ^^^^^^^^^^^^^^^^^^^^^
E       AttributeError: 'NoneType' object has no attribute 'id'

../../../../.venv3/lib64/python3.11/site-packages/omero/gateway/__init__.py:1042: AttributeError</errorStackTrace><failedSince>71</failedSince><name>testGetObjectsAnnotation</name><properties></properties><skipped>false</skipped><status>FAILED</status></caseResult>