Hello,
I am the administrator for our organization. I am cleaning up some AGOL groups and noticed 15 groups are set to be Open Data when they should not be. You can not change this setting from the website. So I opened a new python notebook, found the line of code and ran it. KeyError: 'isopendata'. I can update many other properties of the group so I know it's not a problem of credentials or improper definitions.
And it won't even show the OpenData status much less update it. I also tried it is_opendata, isOpenData, is_open_data and is_OpenData. Does anyone know how to fix this?
if groups:
group = groups[0]
print(f"\nFound group '{group.title}' (ID: {group.id}).")
print(f"Current Open Data Status: {group.is_OpenData}")
Found group 'Turtle Citizen Science Group' (ID: ad50b2d6928d4c868f14a76d7ccaf812).
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
C:/Users/bzizzami/AppData/Local/Temp/ArcGISProTemp11616/xpython_11616/556997666.py in ?()
1 if groups:
2 group = groups[0]
3 print(f"\nFound group '{group.title}' (ID: {group.id}).")
----> 4 print(f"Current Open Data Status: {group.is_OpenData}")
KeyError: 'is_OpenData'
group.update(is_opendata=False)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[47], line 1
----> 1 group.update(is_opendata=False)
TypeError: Group.update() got an unexpected keyword argument 'is_opendata'