AnsweredAssumed Answered

arcpy.CreateAddressLocator_geocoding raise ERROR 000046 too many reference data tables for this style

Question asked by DemersM on Sep 19, 2019
Latest reply on Jan 31, 2020 by DemersM



I have an error while trying to automatize the creation of an address locator. Any idea what can be wrong in my code below?


I only use 1 data table as reference so why this error?


I am using arcpy v10.6


import arcpy

arcpy.env.workspace = "C:\\Script\\Connexions\\connection.sde\\MyDataSet"

configs = {
    "IN_ADDRESS_LOCATOR_STYLE": "General-Single Field",
    "IN_REFERENCE_DATA": "ReferenceDataFC 'Primary Table'",
    "IN_FIELD_MAP": "'Feature ID' ObjectID VISIBLE NONE;'*KeyField' addresse VISIBLE NONE",
    "OUT_ADDRESS_LOCATOR": "C:\\Script\\Output\\MyLocator",

    in_address_locator_style = configs["IN_ADDRESS_LOCATOR_STYLE"],
    in_reference_data = configs["IN_REFERENCE_DATA"],
    in_field_map = configs["IN_FIELD_MAP"],
    out_address_locator = configs["LOC"],
    config_keyword = configs["CONFIG_KEYWORD"],
    enable_suggestions = configs["ENABLE_SUGGESTIONS"]


I have noticed that if I write "General - Single Field" instead of "General-Single Field" for the in_address_locator_style parameter I got the ERROR 000039: Not enough reference data tables for this style.


This is very confusing...