<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error 001369 when overwriting locator\geocode service in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1040987#M29820</link>
    <description>&lt;P&gt;I have been able to successfully publish a locator to our portal. Works great in a web map and in ArcGIS Pro both in the locator pane and the batch geocoding tools. Used the Create Locator tool in ArcGIS Pro 2.7.2 and published to Enterprise 10.6.1.&lt;/P&gt;&lt;P&gt;I am now trying to update the locator with new addresses. I have successfully used the Rebuild Address Locator tool and tested it locally in Pro to see that the new addresses are being found. However I am getting&amp;nbsp;&lt;U&gt;&lt;EM&gt;ERROR 001369: Failed to create the service&lt;/EM&gt;&lt;/U&gt; whenever I try to overwrite or update the locator and geocoding service. I have tried the Overwrite Locator tool in Pro and also this &lt;A href="https://www.arcgis.com/home/item.html?id=54e8aab14f6e4c61b65b9dd9ab451503" target="_blank" rel="noopener"&gt;Updating Geocoding Services&lt;/A&gt; script. I have also now downgraded to ArcGIS Pro 2.6.3 and rebuilt the locator from scratch, but am still getting the same error when overwriting.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Execute StageService to convert sddraft file to a service definition (sd) file
arcpy.server.StageService(sddraft_file, sd_file)
# Execute UploadServiceDefinition to publish the service definition file as a service
arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
arcpy.AddMessage("The geocode service was successfully published")&lt;/LI-CODE&gt;&lt;P&gt;It does the StageService fine but is erroring on the Upload Service Definition line. Here is the full error message from the script output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;An error occured ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).

ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).

Error thrown
Traceback (most recent call last):
  File "Update.py", line 235, in main
    arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1263, in UploadServiceDefinition
    raise e
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1260, in UploadServiceDefinition
    retval = convertArcObjectToPythonObject(gp.UploadServiceDefinition_server(*gp_fixargs((in_sd_file, in_server, in_service_name, in_cluster, in_folder_type, in_folder, in_startupType, in_override, in_my_contents, in_public, in_organization, in_groups), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in &amp;lt;lambda&amp;gt;
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.&lt;/LI-CODE&gt;&lt;P&gt;Is anyone able to help with this? Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Mar 2021 10:52:43 GMT</pubDate>
    <dc:creator>Tim_McGinnes</dc:creator>
    <dc:date>2021-03-26T10:52:43Z</dc:date>
    <item>
      <title>Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1040987#M29820</link>
      <description>&lt;P&gt;I have been able to successfully publish a locator to our portal. Works great in a web map and in ArcGIS Pro both in the locator pane and the batch geocoding tools. Used the Create Locator tool in ArcGIS Pro 2.7.2 and published to Enterprise 10.6.1.&lt;/P&gt;&lt;P&gt;I am now trying to update the locator with new addresses. I have successfully used the Rebuild Address Locator tool and tested it locally in Pro to see that the new addresses are being found. However I am getting&amp;nbsp;&lt;U&gt;&lt;EM&gt;ERROR 001369: Failed to create the service&lt;/EM&gt;&lt;/U&gt; whenever I try to overwrite or update the locator and geocoding service. I have tried the Overwrite Locator tool in Pro and also this &lt;A href="https://www.arcgis.com/home/item.html?id=54e8aab14f6e4c61b65b9dd9ab451503" target="_blank" rel="noopener"&gt;Updating Geocoding Services&lt;/A&gt; script. I have also now downgraded to ArcGIS Pro 2.6.3 and rebuilt the locator from scratch, but am still getting the same error when overwriting.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Execute StageService to convert sddraft file to a service definition (sd) file
arcpy.server.StageService(sddraft_file, sd_file)
# Execute UploadServiceDefinition to publish the service definition file as a service
arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
arcpy.AddMessage("The geocode service was successfully published")&lt;/LI-CODE&gt;&lt;P&gt;It does the StageService fine but is erroring on the Upload Service Definition line. Here is the full error message from the script output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;An error occured ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).

ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (UploadServiceDefinition).

Error thrown
Traceback (most recent call last):
  File "Update.py", line 235, in main
    arcpy.server.UploadServiceDefinition(sd_file, ags_connection)
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1263, in UploadServiceDefinition
    raise e
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\server.py", line 1260, in UploadServiceDefinition
    retval = convertArcObjectToPythonObject(gp.UploadServiceDefinition_server(*gp_fixargs((in_sd_file, in_server, in_service_name, in_cluster, in_folder_type, in_folder, in_startupType, in_override, in_my_contents, in_public, in_organization, in_groups), True)))
  File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 511, in &amp;lt;lambda&amp;gt;
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
Failed.
Failed to execute (Publish Service Definition).
Failed.&lt;/LI-CODE&gt;&lt;P&gt;Is anyone able to help with this? Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 10:52:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1040987#M29820</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2021-03-26T10:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041005#M29821</link>
      <description>&lt;P&gt;Could you stop the existing Geocode Service, and then redo the proces?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 11:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041005#M29821</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2021-03-26T11:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041019#M29822</link>
      <description>&lt;P&gt;Are you planning to make this an automated solution?&amp;nbsp; If so, I would be interested to how you are able to automate the stopping of the geocode service as this is part of the current process that I have thus far been unable to migrate from a python 2.7 script (ArcMap) to python 3.6 script (Pro).&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 12:43:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041019#M29822</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2021-03-26T12:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041263#M29830</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/95280"&gt;@JayantaPoddar&lt;/a&gt;&amp;nbsp;, I have narrowed down the error to ArcGIS Server being unable to rename the service. This occurred regardless if I manually stopped the service prior to doing the overwrite, or if ArcGIS Server automatically stopped the service during the overwrite. Here are some logs of both scenarios.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;Creating the Locator service then overwriting it:&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Overwrite Locator_YYY Service&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;VERBOSE Job 'j245c93962c164bd58f60ef87eaf56eda' for service 'System/PublishingToolsEx' completed its execution. The status of the job after completion was 'esriJobFailed'. Elapsed time '25644' ms. 2021-03-26T20:29:01 Server&lt;BR /&gt;SEVERE Error executing tool. PublishServiceDefinition Job ID: j245c93962c164bd58f60ef87eaf56eda : ERROR 001369: Failed to create the service. (more) 2021-03-26T20:29:01 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Execute job j245c93962c164bd58f60ef87eaf56eda 2021-03-26T20:29:01 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE End execute 2021-03-26T20:29:01 System/PublishingToolsEx.GPServer&lt;BR /&gt;INFO Deleted the item 'i038f087b-77dd-4694-bb6a-68537ec31ae0' successfully. 2021-03-26T20:29:01 Admin&lt;BR /&gt;SEVERE Failed to create the service.: ERROR: code:500, Failed to rename service 'Locator_YYY.GeocodeServer'., Internal server error. 2021-03-26T20:29:01 System/PublishingToolsEx.GPServer&lt;BR /&gt;FINE End create service wrapper 2021-03-26T20:29:01 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Released 'service-locator_yyy_202103262028.geocodeserver' workflow lock. 2021-03-26T20:29:01 Admin&lt;BR /&gt;VERBOSE Released 'service-locator_yyy.geocodeserver' workflow lock. 2021-03-26T20:29:01 Admin&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;SEVERE Failed to rename service 'Locator_YYY.GeocodeServer'. 2021-03-26T20:29:01 Admin&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;FINE Shutting down an instance of service 'Locator_YYY.GeocodeServer'. 2021-03-26T20:28:36 Locator_YYY.GeocodeServer&lt;BR /&gt;FINE Shutting down an instance of service 'Locator_YYY.GeocodeServer'. 2021-03-26T20:28:36 Locator_YYY.GeocodeServer&lt;BR /&gt;VERBOSE Acquired 'service-locator_yyy.geocodeserver' workflow lock. 2021-03-26T20:28:36 Admin&lt;BR /&gt;VERBOSE Stopping the service 'Locator_YYY.GeocodeServer'. 2021-03-26T20:28:36 Admin&lt;BR /&gt;INFO Service to publish: [name: Locator_YYY; type: GeocodeServer]. 2021-03-26T20:28:36 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Job j245c93962c164bd58f60ef87eaf56eda is successfully submitted. 2021-03-26T20:28:35 System/PublishingToolsEx.GPServer&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Create Locator_YYY&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;VERBOSE Job 'j09315681d0ba4a9abff4246a7955a24e' for service 'System/PublishingTools' completed its execution. The status of the job after completion was 'esriJobSucceeded'. Elapsed time '25076' ms. 2021-03-26T20:13:20 Server&lt;BR /&gt;INFO Service published [name: Locator_YYY; type: GeocodeServer]. 2021-03-26T20:13:17 System/PublishingToolsEx.GPServer&lt;BR /&gt;INFO Service 'Locator_YYY.GeocodeServer' was created successfully. 2021-03-26T20:13:10 Admin&lt;BR /&gt;INFO Service to publish: [name: Locator_YYY; type: GeocodeServer]. 2021-03-26T20:12:57 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Job j09315681d0ba4a9abff4246a7955a24e is successfully submitted. 2021-03-26T20:12:55 System/PublishingTools.GPServer&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;Creating the locator service, manually stopping the service, then overwriting it:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Overwrite Locator_AAA Service&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;VERBOSE Job 'jc09b7e8d949c41ef8750e7237f9d9d85' for service 'System/PublishingTools' completed its execution. The status of the job after completion was 'esriJobFailed'. Elapsed time '27614' ms. 2021-03-27T08:55:49 Server&lt;BR /&gt;SEVERE Error executing tool. PublishServiceDefinition Job ID: jc09b7e8d949c41ef8750e7237f9d9d85 : ERROR 001369: Failed to create the service. (more) 2021-03-27T08:55:49 System/PublishingTools.GPServer&lt;BR /&gt;SEVERE Error executing tool. PublishServiceDefinition Job ID: ja56785d59ca7429390142f914c288b7c : ERROR 001369: Failed to create the service. (more) 2021-03-27T08:55:47 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Execute job ja56785d59ca7429390142f914c288b7c 2021-03-27T08:55:47 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE End execute 2021-03-27T08:55:47 System/PublishingToolsEx.GPServer&lt;BR /&gt;INFO Deleted the item 'i50bc29e8-722f-4bc6-b531-3201340105b1' successfully. 2021-03-27T08:55:47 Admin&lt;BR /&gt;SEVERE Failed to create the service.: ERROR: code:500, Failed to rename service 'Locator_AAA.GeocodeServer'., Internal server error. 2021-03-27T08:55:47 System/PublishingToolsEx.GPServer&lt;BR /&gt;FINE End create service wrapper 2021-03-27T08:55:47 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Released 'service-locator_aaa_202103270855.geocodeserver' workflow lock. 2021-03-27T08:55:47 Admin&lt;BR /&gt;VERBOSE Released 'service-locator_aaa.geocodeserver' workflow lock. 2021-03-27T08:55:47 Admin&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;SEVERE Failed to rename service 'Locator_AAA.GeocodeServer'. 2021-03-27T08:55:47 Admin&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;WARNING Unable to process request. Error handling service request :Could not find service. Service may be stopped or it may not be configured. 2021-03-27T08:55:40 Rest&lt;BR /&gt;INFO Service to publish: [name: Locator_AAA; type: GeocodeServer]. 2021-03-27T08:55:23 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Job jc09b7e8d949c41ef8750e7237f9d9d85 is successfully submitted. 2021-03-27T08:55:21 System/PublishingTools.GPServer&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Stop Locator_AAA Service&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;VERBOSE Released 'service-locator_aaa.geocodeserver' workflow lock. 2021-03-27T08:51:47 Admin&lt;BR /&gt;VERBOSE Stopping the service 'Locator_AAA.GeocodeServer'. 2021-03-27T08:51:46 Admin&lt;BR /&gt;FINE Shutting down an instance of service 'Locator_AAA.GeocodeServer'. 2021-03-27T08:51:46 Locator_AAA.GeocodeServer&lt;BR /&gt;VERBOSE Acquired 'service-locator_aaa.geocodeserver' workflow lock. 2021-03-27T08:51:46 Admin&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Create Locator_AAA&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;VERBOSE Job 'je99488525f97409f8d54f9b88cf63875' for service 'System/PublishingTools' completed its execution. The status of the job after completion was 'esriJobSucceeded'. Elapsed time '25411' ms. 2021-03-27T08:49:42 Server&lt;BR /&gt;INFO Service published [name: Locator_AAA; type: GeocodeServer]. 2021-03-27T08:49:40 System/PublishingToolsEx.GPServer&lt;BR /&gt;INFO Service 'Locator_AAA.GeocodeServer' was created successfully. 2021-03-27T08:49:32 Admin&lt;BR /&gt;INFO Service to publish: [name: Locator_AAA; type: GeocodeServer]. 2021-03-27T08:49:18 System/PublishingToolsEx.GPServer&lt;BR /&gt;VERBOSE Job je99488525f97409f8d54f9b88cf63875 is successfully submitted. 2021-03-27T08:49:16 System/PublishingTools.GPServer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 23:54:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041263#M29830</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2021-03-26T23:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041264#M29831</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10036"&gt;@MichaelVolz&lt;/a&gt;&amp;nbsp;I was planning to semi automate this - on demand at the moment. From looking at the logs, you shouldn't need to manually stop the service as the overwrite process handles it all. That&amp;nbsp;&lt;A href="https://www.arcgis.com/home/item.html?id=54e8aab14f6e4c61b65b9dd9ab451503" target="_blank" rel="nofollow noopener noreferrer"&gt;Updating Geocoding Services&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;script in my original post already works in Pro &amp;amp; Python 3.6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here's a great video with various options for updating locators and services where that script is discussed:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.esri.com/t5/devsummit-conference-videos/updating-your-locator-service/m-p/976744" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/devsummit-conference-videos/updating-your-locator-service/m-p/976744&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Mar 2021 00:10:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1041264#M29831</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2021-03-27T00:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error 001369 when overwriting locator\geocode service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1060607#M30256</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10036"&gt;@MichaelVolz&lt;/a&gt;, this is something I've been working on lately; automating the rebuild and republishing of locator services since in our city, they need to be done on a weekly basis.&amp;nbsp; While I am still working out how to programmatically replace the service once it has been rebuilt, the code for rebuilding the locator and stopping the service via python is below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;import&amp;nbsp;arcpy&lt;/DIV&gt;&lt;DIV&gt;from&amp;nbsp;arcgis.gis&amp;nbsp;import&amp;nbsp;GIS&lt;/DIV&gt;&lt;DIV&gt;import&amp;nbsp;arcgis.gis.admin&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;import&amp;nbsp;os&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#create&amp;nbsp;a&amp;nbsp;new&amp;nbsp;locator&amp;nbsp;for&amp;nbsp;a&amp;nbsp;locator&amp;nbsp;on&amp;nbsp;disk&lt;/DIV&gt;&lt;DIV&gt;target_locator_name&amp;nbsp;=&amp;nbsp;'Locator_Local'&lt;/DIV&gt;&lt;DIV&gt;local_locator_name&amp;nbsp;=&amp;nbsp;r'Locator_Local.loc'&lt;/DIV&gt;&lt;DIV&gt;local_locator_folder&amp;nbsp;=&amp;nbsp;r'C:\ArcGIS\Workspaces\Locators_ArcPro'&lt;/DIV&gt;&lt;DIV&gt;local_locator_path&amp;nbsp;=&amp;nbsp;os.path.join(local_locator_folder,local_locator_name)&lt;/DIV&gt;&lt;DIV&gt;locator&amp;nbsp;=&amp;nbsp;arcpy.geocoding.Locator(local_locator_path)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;def&amp;nbsp;print_profile_info(gis):&lt;/DIV&gt;&lt;DIV&gt;#prints&amp;nbsp;connection&amp;nbsp;information&amp;nbsp;for&amp;nbsp;the&amp;nbsp;supplied&amp;nbsp;gis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print("Successfully&amp;nbsp;logged&amp;nbsp;into&amp;nbsp;'{}'&amp;nbsp;via&amp;nbsp;the&amp;nbsp;'{}'&amp;nbsp;user".format(&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gis.properties.portalHostname,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gis.properties.user.username))&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;def&amp;nbsp;print_locator_info(locator):&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;print&amp;nbsp;out&amp;nbsp;locator&amp;nbsp;info&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;all&amp;nbsp;of&amp;nbsp;these&amp;nbsp;properties&amp;nbsp;are&amp;nbsp;only&amp;nbsp;updatable&amp;nbsp;via&amp;nbsp;the&amp;nbsp;updateLocator()&amp;nbsp;method&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;on&amp;nbsp;a&amp;nbsp;local&amp;nbsp;copy&amp;nbsp;of&amp;nbsp;the&amp;nbsp;service.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;Update&amp;nbsp;locally&amp;nbsp;&amp;amp;&amp;nbsp;publish&amp;nbsp;again&amp;nbsp;to&amp;nbsp;update&amp;nbsp;the&amp;nbsp;service&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Categories:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;locator.categories)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;print(locator.capabilities)&amp;nbsp;#only&amp;nbsp;supported&amp;nbsp;for&amp;nbsp;geocoding&amp;nbsp;services,&amp;nbsp;not&amp;nbsp;local&amp;nbsp;locators&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Min&amp;nbsp;match&amp;nbsp;score:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.minMatchScore))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Min&amp;nbsp;candidate&amp;nbsp;score:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.minCandidateScore))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Max&amp;nbsp;candidates:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.maxCandidates))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Max&amp;nbsp;suggest&amp;nbsp;candidates:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.maxSuggestCandidates))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Default&amp;nbsp;suggest&amp;nbsp;candidates:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.defaultSuggestCandidates))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Match&amp;nbsp;out&amp;nbsp;of&amp;nbsp;range:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.matchOutOfRange))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Reverse&amp;nbsp;geocode&amp;nbsp;feature&amp;nbsp;types:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.reverseGeocodeFeatureTypes))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Supported&amp;nbsp;countries:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.supportedCountries))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Spatial&amp;nbsp;reference:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.spatialReference))&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;these&amp;nbsp;properties&amp;nbsp;are&amp;nbsp;read&amp;nbsp;only&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Supported&amp;nbsp;Roles:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;locator.supportedRoles)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;print('Single&amp;nbsp;line&amp;nbsp;input&amp;nbsp;field:&amp;nbsp;'&amp;nbsp;+&amp;nbsp;str(locator.singleLineField.name))//in&amp;nbsp;version&amp;nbsp;2.6&amp;nbsp;there&amp;nbsp;is&amp;nbsp;no&amp;nbsp;such&amp;nbsp;property&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;def&amp;nbsp;rebuild_the_locator(locator_path):&lt;/DIV&gt;&lt;DIV&gt;#between&amp;nbsp;software&amp;nbsp;updates,&amp;nbsp;rebuilding&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;is&amp;nbsp;sufficient&lt;/DIV&gt;&lt;DIV&gt;#to&amp;nbsp;ensure&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;is&amp;nbsp;up&amp;nbsp;to&amp;nbsp;date&amp;nbsp;with&amp;nbsp;any&amp;nbsp;changes&amp;nbsp;made&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#to&amp;nbsp;the&amp;nbsp;base&amp;nbsp;data&amp;nbsp;from&amp;nbsp;which&amp;nbsp;it&amp;nbsp;was&amp;nbsp;created.&lt;/DIV&gt;&lt;DIV&gt;#this&amp;nbsp;method&amp;nbsp;takes&amp;nbsp;in&amp;nbsp;a&amp;nbsp;locator&amp;nbsp;to&amp;nbsp;be&amp;nbsp;rebuilt&lt;/DIV&gt;&lt;DIV&gt;#after&amp;nbsp;rebuilding,&amp;nbsp;call&amp;nbsp;a&amp;nbsp;method&amp;nbsp;to&amp;nbsp;overwrite&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;service&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.geocoding.RebuildAddressLocator(locator_path)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Locator,&amp;nbsp;{},&amp;nbsp;rebuild&amp;nbsp;complete'.format(target_locator_name))&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;def&amp;nbsp;update_the_locator(locator):&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;Update&amp;nbsp;the&amp;nbsp;re-created&amp;nbsp;locator&amp;nbsp;with&amp;nbsp;the&amp;nbsp;original&amp;nbsp;settings&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.categories&amp;nbsp;=&amp;nbsp;loc_categories&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.minMatchScore&amp;nbsp;=&amp;nbsp;loc_minMatchScore&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.minCandidateScore&amp;nbsp;=&amp;nbsp;loc_minCandidateScore&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.maxCandidates&amp;nbsp;=&amp;nbsp;loc_maxCandidates&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.maxSuggestCandidates&amp;nbsp;=&amp;nbsp;loc_maxSuggestCandidates&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.defaultSuggestCandidates&amp;nbsp;=&amp;nbsp;loc_defaultSuggestCandidates&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.matchOutOfRange&amp;nbsp;=&amp;nbsp;loc_matchOutOfRange&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator.updateLocator()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('Locator,&amp;nbsp;{},&amp;nbsp;updates&amp;nbsp;complete'.format(target_locator_name))&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;#first,&amp;nbsp;print&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;info&amp;nbsp;for&amp;nbsp;review/debugging&lt;/DIV&gt;&lt;DIV&gt;print_locator_info(locator)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#second,&amp;nbsp;save&amp;nbsp;the&amp;nbsp;current&amp;nbsp;locator&amp;nbsp;settings&amp;nbsp;to&amp;nbsp;use&amp;nbsp;after&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;is&amp;nbsp;re-created&lt;/DIV&gt;&lt;DIV&gt;loc_categories&amp;nbsp;=&amp;nbsp;locator.categories&lt;/DIV&gt;&lt;DIV&gt;loc_minMatchScore&amp;nbsp;=&amp;nbsp;locator.minMatchScore&lt;/DIV&gt;&lt;DIV&gt;loc_minCandidateScore&amp;nbsp;=&amp;nbsp;locator.minCandidateScore&lt;/DIV&gt;&lt;DIV&gt;loc_maxCandidates&amp;nbsp;=&amp;nbsp;locator.maxCandidates&lt;/DIV&gt;&lt;DIV&gt;loc_maxSuggestCandidates&amp;nbsp;=&amp;nbsp;locator.maxSuggestCandidates&lt;/DIV&gt;&lt;DIV&gt;loc_defaultSuggestCandidates&amp;nbsp;=&amp;nbsp;locator.defaultSuggestCandidates&lt;/DIV&gt;&lt;DIV&gt;loc_matchOutOfRange&amp;nbsp;=&amp;nbsp;locator.matchOutOfRange&lt;/DIV&gt;&lt;DIV&gt;print('Settings&amp;nbsp;saved')&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#third,&amp;nbsp;rebuild&amp;nbsp;or&amp;nbsp;re-create&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;as&amp;nbsp;needed&lt;/DIV&gt;&lt;DIV&gt;print('Rebuilding&amp;nbsp;the&amp;nbsp;locator')&lt;/DIV&gt;&lt;DIV&gt;rebuild_the_locator(local_locator_path)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#fourth,&amp;nbsp;update&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;with&amp;nbsp;the&amp;nbsp;original&amp;nbsp;settings&amp;nbsp;in&amp;nbsp;case&amp;nbsp;these&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#changed&amp;nbsp;during&amp;nbsp;the&amp;nbsp;rebuild&lt;/DIV&gt;&lt;DIV&gt;print('Updating&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;with&amp;nbsp;the&amp;nbsp;saved&amp;nbsp;settings')&lt;/DIV&gt;&lt;DIV&gt;update_the_locator(locator)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#fifth,&amp;nbsp;connect&amp;nbsp;to&amp;nbsp;the&amp;nbsp;portal&amp;nbsp;and&amp;nbsp;stop&amp;nbsp;the&amp;nbsp;published&amp;nbsp;locator&amp;nbsp;service&lt;/DIV&gt;&lt;DIV&gt;#via&amp;nbsp;locally&amp;nbsp;saved&amp;nbsp;profile&amp;nbsp;that&amp;nbsp;contains&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#username&amp;nbsp;and&amp;nbsp;password&lt;/DIV&gt;&lt;DIV&gt;portal_gis&amp;nbsp;=&amp;nbsp;GIS(profile="PORTAL_GIS")&lt;/DIV&gt;&lt;DIV&gt;print_profile_info(portal_gis)&lt;/DIV&gt;&lt;DIV&gt;portal_servers&amp;nbsp;=&amp;nbsp;portal_gis.admin.servers.list()&lt;/DIV&gt;&lt;DIV&gt;first_server&amp;nbsp;=&amp;nbsp;portal_servers[0]&lt;/DIV&gt;&lt;DIV&gt;print(first_server.url)&lt;/DIV&gt;&lt;DIV&gt;locators_list&amp;nbsp;=&amp;nbsp;first_server.services.list(folder='Locators')&lt;/DIV&gt;&lt;DIV&gt;print(locators_list)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;for&amp;nbsp;locator_item&amp;nbsp;in&amp;nbsp;locators_list:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;print(locator_item.iteminformation.properties)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(locator_item.iteminformation.properties['name'])&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if&amp;nbsp;locator_item.iteminformation.properties['name']&amp;nbsp;==&amp;nbsp;target_locator_name:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(locator_item.status)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;locator_item.stop()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(locator_item.status)&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#sixth,&amp;nbsp;connect&amp;nbsp;to&amp;nbsp;the&amp;nbsp;hosting&amp;nbsp;server&amp;nbsp;and&amp;nbsp;overwrite&amp;nbsp;the&amp;nbsp;locator&amp;nbsp;service&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#seventh,&amp;nbsp;restart&amp;nbsp;the&amp;nbsp;published&amp;nbsp;locator&amp;nbsp;service&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;print('All&amp;nbsp;done.')&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 20:19:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/error-001369-when-overwriting-locator-geocode/m-p/1060607#M30256</guid>
      <dc:creator>SarahBenner</dc:creator>
      <dc:date>2021-05-21T20:19:17Z</dc:date>
    </item>
  </channel>
</rss>

