ArcGIS Python API error- 'GIS' object has no attribute 'tools'

03-27-2017 11:50 PM
New Contributor II

Getting hands on with latest ArcGIS Python API.Getting below error after running processing sample.

Using Geoprocessing tools | ArcGIS for Developers 

from arcgis.gis import GIS

gis = GIS()
map =

diegogarcia ="Diego Garcia") = diegogarcia

AttributeError                            Traceback (most recent call last)<ipython-input-3-cb8f9185cd0a> in <module>()----> 1 diegogarcia ="Diego Garcia")      2 = diegogarciaAttributeError: 'GIS' object has no attribute 'tools' 

I have completed all necessary configurations suggested at Install and set up | ArcGIS for Developers 

conda,Jupyter Notebook and upgraded to latest versions.

0 Kudos
4 Replies
MVP Frequent Contributor

Its exactly as the error says, there is no attribute or method with the GIS object for Tools.

arcgis.gis module — arcgis 1.0.1 documentation 

You should look at the geocoding module.

arcgis.geocoding module — arcgis 1.0.1 documentation 

New Contributor II

I have tried geocoding module and it is working fine.

Should I infer that the example provided by ESRI at Using Geoprocessing tools | ArcGIS for Developers  is wrong and get corrected in future ?

diegogarcia ="Diego Garcia")
0 Kudos
MVP Esteemed Contributor

The code isn't wrong, per se, it just isn't accurate for the current version of the API.  The structure of the API has changed fairly significantly over the past 6 months or so.  Unfortunately, Esri has an issue with their URLs for the ArcGIS API for Python.  For example, the 2 URLs goto different pages with different examples: 

Notice the capitalization differences.  The URL that is all lowercase has the most current/accurate content.

MVP Esteemed Contributor

I just heard back from the ArcGIS API for Python team, the problems URLs have been updated to redirect to the current/accurate URLs.