Select to view content in your preferred language

Script not work on ArcGIS online notebook.

338
1
11-08-2023 05:27 AM
Labels (1)
SriyankarDandapat
New Contributor

Please check the below code:

import arcgis

gis = arcgis.gis.GIS("https://www.arcgis.com", "UserName", "PassWord")
all_groups = gis.groups.search()
group_names = [group.title for group in all_groups]
group_properties = {
    "title": "My_test_group",
    "tags": "test_tag",
    "description": "test_group_description",
    "access": "org",  # Set the access level (org, public, private)
    "thumbnail": "",
    "display_settings": "apps",
    "is_invitation_only": 'True',
    "leaving_disallowed": 'True'
}
print("group_properties dict----------------",group_properties)
if "My_test_group" not in group_names:
    new_group = gis.groups.create(**group_properties)

It runs on  "ArcGIS pro notebook"  successfully and create the group. But when I run it in the ArcGIS online notebook, it shows the following error.
Exception: Administrative groups cannot have collaboration capabilities.
(Error Code: 400)


What might be the reason of this error?

 

Tags (1)
0 Kudos
1 Reply
ChristopherCounsell
MVP Regular Contributor

The error is indicating that the group you are trying to create has conflicting properties.

Groups with administrative settings (such as item update) cannot be enabled for partnered/distributed collaboration.

0 Kudos