Select to view content in your preferred language

run RebuildAddressLocator from python (arcgis pro) but get Error 000005: Could not open the address locator

99
4
Thursday
geopamplona
Emerging Contributor

Hi

I try to run RebuildAddressLocator from python and I get the same error ‘Error 000005: Could not open the address locator’.

I have tried to create the locator from arcgis pro 2.9.5, I generate the loc and loz files, and I try to rebuild the locator, everything works correctly using arcgis pro; but if I close arcgis pro and open it again I can't rebuild the locator and I get Error 000005: Could not open the address locator

The locator source is a feature layer hosted in an enterprise sqlserver database with no locks, as it is a layer that is not published as a service, and with versioning.

I work under a version arcgis pro 2.9.5 and always logged against portal 10.9.1.

I have installed the license manager on the machine I run from but I haven't changed anything.

The idea would be to go ahead and launch this from python as you do to schedule it weekly but I can't get out of this simple point.

Thank you!

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

You indicate you are using python, so presumably your script may be at issue.  In any event have you examined all the possible reasons that this error may be shown and their solutions as listed in the help files.

000005: Could not open the address locator.—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
geopamplona
Emerging Contributor

The script is simply trying to rebuild the locator.

The problem is that both in the script and in ArcGIS Pro I get the same error, it fails to access the data source.

 

arcpy.geocoding.RebuildAddressLocator(r"C:\test\locator.loc")

0 Kudos
DanPatterson
MVP Esteemed Contributor

The only other reference, which mentions python scripts, appears here

FAQ: Best Practices for Deploying Address Locators on a Network Location to Avoid Locking (esri.com)

 


... sort of retired...
0 Kudos
MichaelVolz
Esteemed Contributor

Is the locator itself being used in a geocode service?  If so, you need to stop the geocode service.

You said "The locator source is a feature layer hosted in an enterprise sqlserver database."  Does this mean this is a standard enterprise feature class or is this a service?

Was your connection to the enterprise SQL Server database done using a location sde connection on the C-drive or was it a mapped network drive location to the sde connection?

0 Kudos