<?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 Running Generate Service Areas Tool in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048170#M7477</link>
    <description>&lt;P&gt;I created a custom geoprocessing tool in arcpy in ArcGIS Pro. In this I use the Generate Service Areas tool. This works as expected in Pro, but when I upload to an ArcGIS Server and try to run it in a web app in AGOL it fails. Here is a snippet of code from the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tbx = "https://logistics.arcgis.com/arcgis/services;World/ServiceAreas;username;password"
 arcpy.ImportToolbox(tbx)
 arcpy.AddToolbox(tbx)
result = arcpy.GenerateServiceAreas_ServiceAreas(facilities, breakValues, breakUnits) 
while result.status &amp;lt; 4:
     time.sleep(1)
result_severity = result.maxSeverity 
if result_severity == 2:
     arcpy.AddError("An error occured when running the tool")     
    arcpy.AddError(result.getMessages(2))
     sys.exit(2)
 elif result_severity == 1: 
    arcpy.AddWarning("Warnings were returned when running the tool")     
    arcpy.AddWarning(result.getMessages(1)) result.getOutput(0).save(serviceArea)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what could cause this to fail or a workaround?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 15:44:15 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-04-16T15:44:15Z</dc:date>
    <item>
      <title>Error Running Generate Service Areas Tool</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048170#M7477</link>
      <description>&lt;P&gt;I created a custom geoprocessing tool in arcpy in ArcGIS Pro. In this I use the Generate Service Areas tool. This works as expected in Pro, but when I upload to an ArcGIS Server and try to run it in a web app in AGOL it fails. Here is a snippet of code from the script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tbx = "https://logistics.arcgis.com/arcgis/services;World/ServiceAreas;username;password"
 arcpy.ImportToolbox(tbx)
 arcpy.AddToolbox(tbx)
result = arcpy.GenerateServiceAreas_ServiceAreas(facilities, breakValues, breakUnits) 
while result.status &amp;lt; 4:
     time.sleep(1)
result_severity = result.maxSeverity 
if result_severity == 2:
     arcpy.AddError("An error occured when running the tool")     
    arcpy.AddError(result.getMessages(2))
     sys.exit(2)
 elif result_severity == 1: 
    arcpy.AddWarning("Warnings were returned when running the tool")     
    arcpy.AddWarning(result.getMessages(1)) result.getOutput(0).save(serviceArea)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what could cause this to fail or a workaround?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 15:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048170#M7477</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-04-16T15:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error Running Generate Service Areas Tool</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048255#M7478</link>
      <description>&lt;P&gt;Is that the exact code used in both environments?&lt;/P&gt;&lt;P&gt;What was the error message?&lt;/P&gt;&lt;P&gt;AddToolbox and ImportToolbox are the same&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/addtoolbox.htm" target="_blank"&gt;AddToolbox—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 18:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048255#M7478</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-04-16T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error Running Generate Service Areas Tool</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048256#M7479</link>
      <description>&lt;P&gt;Hi, I am trying to understand more about your workflow. Do you want to run GenerateServiceAreas from your enterprise, which points to GenerateServiceAreas in ArcGIS Online? If that's the case, you can refer to this &lt;A href="https://enterprise.arcgis.com/en/portal/latest/administer/windows/configure-portal-for-directions.htm#GUID-D566A28D-7A77-4777-B20F-447088FEA63C" target="_self"&gt;documentation&lt;/A&gt; to configure route utility service on your portal, to use ArcGIS Online routing services.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 18:33:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/error-running-generate-service-areas-tool/m-p/1048256#M7479</guid>
      <dc:creator>Max_Zeng</dc:creator>
      <dc:date>2021-04-16T18:33:03Z</dc:date>
    </item>
  </channel>
</rss>

