Select to view content in your preferred language

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

898
6
10-17-2024 11:15 PM
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
6 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
MarkGambordella
Regular Contributor

Did you ever find the reason why and if so what is the workaround.  having same issue, will not rebuild in Arc Pro or script (Error 000005) .  We switched from an Oracle to SQL server and built the NEW locators exactly the same, then the issue began.  they path directly to the NEW SQL SDE database.  I am signed in with my Microsoft authenticator (all restrictions).  I am able to build them but not rebuild.  I can use them in AGO and PRO.  The composite is published to the REST server as a geolocator in AGO which in turn is used in everyone's PRO for the organization.  

0 Kudos
MarkGambordella
Regular Contributor

Did you ever find the reason why and if so what is the workaround.  having same issue, will not rebuild in Arc Pro or script.  We switched from an Oracle to SQL server and built the NEW locators exactly the same, then the issue began.  

0 Kudos