I have created a group in my Enterprise portal and shared about 1500 images to this group. I have been trying to write a script to assign categories to each image based on the country code in the image name. According to the ArcGIS Python API, Group objects should have a 'categories' property, but when I attempt to access this via the following (generalized) example:
MyGroup = portal.groups.get('GroupIdNumber')
I get an error stating: 'Group' object has no attribute 'categories'
It appears I should be able to get the CategorySchemaManager through this property and then use the assign_to_items function to complete the process.
I can access the group and its content just fine, but I cannot seem to find a way to access the categories property in order to assign items to the categories.
Is there another way that I can use to assign categories to each item shared with a group?