When one uses the Create Address Locator tool in model builder, and then exports the model to a .py script, the line of the script that does the actual creation starts with:
arcpy.CreateAddressLocator_geocoding("US Address - Dual Ranges", etc etc etc
In this example I used the out of the box ESRI locator style.
How does model builder / arcpy know what locator style to use?
I ask because I’m trying to build a model / .py script that uses a custom locator style and when I do, it errors out with a 00042 error: Failed to create the address locator. I can run the Create Locator tool and the custom style and mapping the appropriate fields without any problem: in model builder it bails out.
Error 00042 provides the following:
Description
The address locator cannot be created.
Solution
Check that you have the following:
- Permission to write to the disk or database
- Enough disk space for the address locator you are trying to create
- Valid network or database connection
- Valid geocoding rule files
- Valid address locator style
The description is pretty obvious, but the solution isn’t. The first three items I have covered. But the rules and style validity have me stymied. How can I convince the model builder and subsequently arcpy that what I’m providing is valid?