Is This Content Helpful?
We're glad to know this article was helpful.
Executing a Python script containing a rebuild address locator function returns the following error message:
Error: ERROR 000005: Could not open the address locator. Failed to execute (RebuildAddressLocator).
This issue can occur due to the following causes:
Prior to rebuilding an address locator, if new records are added to the database, the conflicting outdated records that are still associated with the original address locator name are retained in the repository tables used by the ArcGIS for Server service. These orphaned records prevent the system from rebuilding the address locator due to conflicts with the new records. For more information on repository tables, refer to ArcGIS Help: Types of repositories.
Note: Although the address locator can be rebuilt with a different name, to rebuild the address locator with the original name, refer to the Solution section on removing orphaned records.Locks
Follow any of the suggested solutions below to fix the issue, depending on the causes.
DELETE FROM <locator_name>_lox WHERE name = <address_locator_name>; DELETE FROM SDE_locators WHERE name = <address_locator_name>; DELETE FROM SDE_metadata WHERE name = <address_locator_name>; DELETE FROM SDE_table_registry WHERE name = <address_locator_name>; DELETE FROM SDE_column_registry WHERE name = <address_locator_name>; DELETE FROM GDB_ITEMS WHERE name = <address_locator_name>;
Note: The tables listed above are system tables containing records of an address locator.
C:\Python27\ArcGIS10.x\python.exeAdditionally, if the script is executed using the Python console in ArcMap and it fails, change the Windows file association setting to run Python with in the 32-bit environment. For steps on how to do so, refer to FAQ: Why do Python scripts fail on a machine with both ArcGIS for Server and Desktop installed?