arcgis-python-api
arcgis-python-api copied to clipboard
400 Error When Utilizing the License Manager
Describe the bug
When using .admin.license.all() or .admin.license.get() the following warning is displayed before the API returns the requested information:
'listing'
not licensed by user
(Error Code: 400)
not licensed by user
(Error Code: 400)
'listing'
To Reproduce Steps to reproduce the behavior:
import arcgis
gis = arcgis.gis.GIS("home")
licenses = gis.admin.license.all()
print(licenses)
# licenses available, choose any
# ArcGIS Business Analyst Web and Mobile Apps, ArcGIS Community Analyst, ArcGIS Drone2Map, ArcGIS Insights, ArcGIS Pro
single_license = gis.admin.license.get("ArcGIS Pro")
print(single_license)
error:
'listing'
not licensed by user
(Error Code: 400)
not licensed by user
(Error Code: 400)
'listing'
Expected behavior
I'm unsure what is causing the issue, as per the documentation, if an organization has access to licensing from the Marketplace then those extensions may not produce valid license objects. This could possibly explains issues from the all() function, but when accessing a single, Esri license, using get() I would not expect those 400 errors to crop up.
Platform (please complete the following information):
- Python API Version
2.4.0
Additional context This was reproduced in a standalone Conda environment with Jupyter Notebook and also utilizing an ArcGIS Online notebook.