Hello, I am trying to automate geocoding a table of addresses. When I do it in ArcGIS/ArcMap via the geocoding toolbox, I have no problems. When I try to run the same using the python window, I get this error:
ERROR 000732: Input Address Locator: Dataset Ready-To-Use Services\Geocoding\ArcGIS World Geocoding Service.GeocodeServer does not exist or is not supported I am not sure what's going on. Any help will be appreciated. Thanks. PS - I have also posted this question on StackOverflow. Code that I tried. System: ArcMap 10.5.1 on Windows 10 machine.import arcpy
address_test_txt = "C:\\temp\\address_test.txt"
address_locator = "Ready-To-Use Services\\Geocoding\\ArcGIS World Geocoding Service.GeocodeServer"
arc_test_0719_shp = "C:\\temp\\arc_test_0719_2.shp"
add_fields = "'Address or Place' Field5 VISIBLE NONE; City Field6 VISIBLE NONE; State Field7 VISIBLE NONE;ZIP Field8 VISIBLE NONE"
# Process: Geocode Addresses
arcpy.GeocodeAddresses_geocoding(address_test_txt, address_locator, add_fields, arc_test_0719_shp, "STATIC")
Full listing of the error message:
Traceback (most recent call last):
File "", line 1, in
arcpy.GeocodeAddresses_geocoding(address_test_txt, address_locator, add_fields, arc_test_0719_shp, "STATIC")
File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geocoding.py", line 295, in GeocodeAddresses
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Address Locator: Dataset Ready-To-Use Services\Geocoding\ArcGIS World Geocoding Service.GeocodeServer does not exist or is not supported
Failed to execute (GeocodeAddresses).
is that an online service? I don't know how you would get there from the inputs your provided
Tutorial: Geocode a table of addresses—ArcGIS Pro | ArcGIS Desktop
Thanks Dan. We have an organization account, and the ArcGIS Online World Geocoding Service shows up automatically. I tried replacing the locator address with "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer " but still get the same error. The locator that I used in my code is same as the one that I get if I use a model builder and export the model to a python script. Thanks.
I would suggest using an ArcGIS Server Connection file in your python script to geocode using the ArcGIS World Geocoding Service, which is described in the following script.
Thanks so much. I will try out the script that you suggested.
@ShanaBrittHello, in this script they use arcpy.mapping.CreateGISServerConnectionFile(). This is apparently an Arcpy Mapping function used in ArcMap. I'm using Pro and the script errors on that function:
AttributeError: module 'arcpy' has no attribute 'mapping'
There's since been an idea posted about getting this to work in Pro. Just checking if there was any news on this. https://community.esri.com/t5/arcgis-pro-ideas/add-creategisserverconnectionfile-to-arcpy-for/idi-p/...
@JaredPilbeam2 I'm not aware of any movement on the idea for CreateGISServerConnection for arcpy in Pro. I did reach out to the team that would be considering this, so hopefully they will respond in that idea post.