English

Error: ERROR 000005: Could not open the address locator

Error Message

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).
Image of the error message

Cause

This issue can occur due to the following causes:

Orphaned Records
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
The error is returned as active locks are in place on the address locator, preventing the address locator from being rebuilt. The active locks are in place as there are other services still accessing the geocoding service. For more information on how locks work, refer to ArcGIS Help: Schema locking.

32-bit vs. 64-bit
Executing the rebuild address locator script in a 64-bit command line returns this error as the script may call upon tools or functions that are not supported by a 64-bit environment. There are instances where some ArcMap tools and programs run in the 64-bit environment despite a 32-bit installation of ArcMap. For more information, refer to ArcGIS Help: Background Geoprocessing (64-bit).

Solution or Workaround

 Follow any of the suggested solutions below to fix the issue, depending on the causes.

  • Remove Orphaned Records
  1. Identify the name of the address locator to rebuild.
  2. Create a backup of the server database.
  3. Run the following queries in the database to remove orphaned records from the <locator_name>_lox, SDE_locators, SDE_metadata, SDE_table_registry, SDE_column_registry, and GDB_items system tables:
    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. 
    
  4. Execute the Python script to rebuild the address locator.
  • Stop the Service
  1. Stop the ArcGIS for Server service.
  2. Execute the script to rebuild the address locator.
  3. Start the service.
For more information on how to start and stop a service, refer to ArcGIS Help: Starting and stopping services.
  • Run the script in the 32-bit environment
Execute the script with the 32-bit version Python command line interface instead of the 64-bit version. The 32-bit version can be found in:
C:\Python27\ArcGIS10.x\python.exe
Additionally, 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?

Related Information