ArcGIS Python API

The ArcGIS API for Python is a powerful, modern and easy to use Pythonic library to perform GIS visualization and analysis, spatial data management and GIS system administration tasks that can run both in an interactive fashion, as well as using scripts.

The gis module acts as a representation of your GIS. It forms the entry point to your scripst and gives you the ability to manage users, groups and content.

There are a lot of changes in ArcGIS Python API 1.2 than 1.0. E.g, gis.admin module is new, it can allow a better management for adminiatrators of their accounts.


Error

1
2
3
4
5
6
7
8
9
pro_license = gis.admin.license.get('ArcGIS Pro')
pro_license.user_entitlement('Testing_User1', 'geostatAnalystN')

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-42-81b2838eb931> in <module>()
----> 1 pro_license = gis_zuo.admin.license.get('ArcGIS Pro')
2 pro_license.user_entitlement('Testing_User1', 'geostatAnalystN')
AttributeError: 'GIS' object has no attribute 'admin'

Reasons

Arcgis python API Version 1.2 introduces a new admin module. Lower versions need to be upgraded to call admin.


Resolution

Ungrade the API in command line:

1
conda upgrade -c esri arcgis


References

[1] The gis.admin module
[2] arcgis.gis.admin module
[3] AttributeError: ‘GIS’ object has no attribute ‘admin’
[4] ArcGIS API for Python