Select to view content in your preferred language

AttributeError: 'GIS' object has no attribute 'admin'

8971
12
Jump to solution
10-03-2017 01:36 PM
JamesGustine
Regular Contributor

Just starting to play around with the ArcGIS API for Python. I am stuck trying to call server submodule under the admin module. My install can't seem to find either. Just running thru this code on the reference page doesn't work for me.

from arcgis.gis import GIS

gis = GIS("https://portalname.domain.com/portal", "username")
gis_servers = gis.admin.servers.list()

print (gis_servers)
gis doesn't give me access to an admin property



AttributeError: 'GIS' object has no attribute 'admin'

Any clues as to where I am going wrong here would be awesome. Probably something super simple
but thanks in advance. 

James 

12 Replies
by Anonymous User
Not applicable

I appreciate the help, but I'm trying to find a way of saying, "I don't understand what that means." without sounding like an ignoramus, and failing.

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

If you have installed ArcGIS Pro using default installation values, hit the Windows Key + R and put the following into the Run box:

"C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\proenv.bat"

That will open Windows Command Prompt with the Pro Conda environment already activated.  From there, you can run the conda command from above.

by Anonymous User
Not applicable

Thank you! That worked.

It turns out I have a permission issue, but that's between me and the IT dept.The update package at least tried to run.

Randy

0 Kudos