ArcGis Pro 2.4 and/or ArcGIS 1.6.1
I am attempting to automate the creation of a composite locator using the Create Composite Locator tool/syntax in a python script. I keep getting error as shown in the title of this thread.
Here is my function:
locatorsDir = r'\\SLCISARCGIS10-T\arcgisresources\common\geocode\test'
def createCompositeLocator(locatorsDir):
outLocator = '{}\\CompositePY'.format(locatorsDir)
addrSF = '{}\\AddressSF'.format(locatorsDir)
addrSH = '{}AddressSH'.format(locatorsDir)
centerLines = '{}\\Centerline'.format(locatorsDir)
parcels = '{}\\Parcels'.format(locatorsDir)
locators = addrSF + ' AddrSF;' + addrSH + ' AddrSH;' + centerLines + ' Centerline;' + parcels + ' Parcels'
fieldMap = """
SingleKey "Key" true true false 100 Text 0 0 ,First,
\\slcisarcgis10-t\arcgisresources\common\geocode\Test\AddressSF,SingleKey,0,0,
\\slcisarcgis10-t\arcgisresources\common\geocode\Test\AddressSH,Street,0,0,
\\slcisarcgis10-t\arcgisresources\common\geocode\Test\Centerline,Street,0,0,
\\slcisarcgis10-t\arcgisresources\common\geocode\Test\Parcels,SingleKey,0,0
"""
arcpy.geocoding.CreateCompositeAddressLocator(locators,fieldMap,"",outLocator)
The contents of FieldMap comes right out of the create composite locator tool history (Pro) or the geoprocessing results (ArcGIS). The tool executes just fine in either application. I cannot figure out what/why the error is telling me...
Eric Anderson
Brad Niemand
That should just about do it....