AnsweredAssumed Answered

Create a Address Locator

Question asked by Nick.xu@vancouver.ca on Nov 28, 2018
Latest reply on Nov 28, 2018 by jborgion

I'm trying to create a Gazetteer style address locator by python script as:

import arcpy
arcpy.CreateAddressLocator_geocoding(
in_address_locator_style="General Gazetteer",
in_reference_data="(folder)\address2.gdb\ADDRESS_LOCATOR 'Primary Table'",
in_field_map="'Feature ID' OBJECTID VISIBLE NONE;'*Place Name' ADDRESS VISIBLE NONE;Category <None> VISIBLE NONE;Type <None> VISIBLE NONE;Tags <None> VISIBLE NONE;Description <None> VISIBLE NONE;'3-Digit Language Code' <None> VISIBLE NONE;'2-Digit Language Code' <None> VISIBLE NONE;Rank <None> VISIBLE NONE;Neighborhood <None> VISIBLE NONE;City <None> VISIBLE NONE;County <None> VISIBLE NONE;State <None> VISIBLE NONE;'State Abbreviation' <None> VISIBLE NONE;Country <None> VISIBLE NONE;'Country Abbreviation' <None> VISIBLE NONE;'Street Address' <None> VISIBLE NONE;'Full Address' <None> VISIBLE NONE;'Primary Phone' <None> VISIBLE NONE;'Primary URL' <None> VISIBLE NONE;'Display X' <None> VISIBLE NONE;'Display Y' <None> VISIBLE NONE;'Min X value for extent' <None> VISIBLE NONE;'Max X value for extent' <None> VISIBLE NONE;'Min Y value for extent' <None> VISIBLE NONE;'Max Y value for extent' <None> VISIBLE NONE;'Additional Field' USER_DATA VISIBLE NONE",
out_address_locator="(out_put_folder)\test.GeocodeServer",
config_keyword="",
enable_suggestions="ENABLED"
)

 

but got error as: 

Traceback (most recent call last):
File "<module1>", line 12, in <module>
File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geocoding.py", line 160, in CreateAddressLocator
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000046: Too many reference data tables for this style.
Failed to execute (CreateAddressLocator).

 

I did try create locator from arcMap and Pro using the same data and successful.

 

Any thing wrong with my python script?

 

thank you for any help.

Outcomes