I am working on ArcGIS Notebooks
from arcgis.gis import GIS
from IPython.display import display
agol_gis = GIS("https://*********.maps.arcgis.com/home/")
agolSiteAdmin = agol_gis.users.get('siteadmin')
print(agolSiteAdmin.groups)
I am getting following error
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/opt/conda/lib/python3.6/site-packages/arcgis/gis/__init__.py in __getitem__(self, k)
5714 try:
-> 5715 return dict.__getitem__(self, k)
5716 except KeyError:
KeyError: 'groups'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
<ipython-input-159-b0f847f656f3> in <module>
1 # Print all groups
----> 2 print(agolSiteAdmin.groups)
/opt/conda/lib/python3.6/site-packages/arcgis/gis/__init__.py in groups(self)
5883 def groups(self):
5884 """Gets a list of Group objects the current user belongs to."""
-> 5885 return [Group(self._gis, group['id']) for group in self['groups']]
5886 #----------------------------------------------------------------------
5887 def update_license_type(self, user_type):
/opt/conda/lib/python3.6/site-packages/arcgis/gis/__init__.py in __getitem__(self, k)
5717 if not self._hydrated and not k.startswith('_'):
5718 self._hydrate()
-> 5719 return dict.__getitem__(self, k)
5720
5721 def __str__(self):
KeyError: 'groups'
I am using the following version
# packages in environment at /opt/conda:
#
# Name Version Build Channel
ipython 7.5.0 py36h39e3cac_0 defaults
ipython_genutils 0.2.0 py36_0 defaults