<?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 Re: Getting error when trying to Create Buffer using Analysis Services in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/getting-error-when-trying-to-create-buffer-using/m-p/1129290#M63365</link>
    <description>&lt;P&gt;Can you try setting this up in ModelBuilder and then export to python after successful ran and compare to your code?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Dec 2021 21:41:27 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2021-12-28T21:41:27Z</dc:date>
    <item>
      <title>Getting error when trying to Create Buffer using Analysis Services</title>
      <link>https://community.esri.com/t5/python-questions/getting-error-when-trying-to-create-buffer-using/m-p/1129281#M63364</link>
      <description>&lt;P&gt;I'm trying to create a buffer of all parcels with 100 Meters of the National Interstate systems. I'm using a national feature layer of parcels, and selecting based on the Living Atlas USA Freeway System feature layer. I'm following the workflow at&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/analysis/api-reference/find-existing-locations.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/rest/analysis/api-reference/find-existing-locations.htm&lt;/A&gt;. The key code is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;host_url = "&lt;A href="https://www.arcgis.com" target="_blank" rel="noopener"&gt;https://www.arcgis.com&lt;/A&gt;"&lt;BR /&gt;portal_url = "{}/sharing/rest".format(host_url)&lt;BR /&gt;token = get_token(portal_url, username, password)&lt;BR /&gt;analysis_url = get_analysis_url(portal_url, token)&lt;BR /&gt;task = "CreateBuffers"&lt;BR /&gt;output_service = "CreateBuffers_I95"&lt;BR /&gt;params= { "inputLayer": {"url": "&lt;A href="https://services8.arcgis.com/2G8bTpCps4vdRut5/arcgis/rest/services/ParcelAtlas_V2_4/FeatureServer/0" target="_blank" rel="noopener"&gt;https://services8.arcgis.com/2G8bTpCps4vdRut5/arcgis/rest/services/ParcelAtlas_V2_4/FeatureServer/0&lt;/A&gt;"},&lt;BR /&gt;"method": "Geodesic",&lt;BR /&gt;"spatialRel": "withinDistance",&lt;BR /&gt;"selectingLayer": "&lt;A href="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Freeway_System_analysis/FeatureServer/0" target="_blank" rel="noopener"&gt;https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Freeway_System_analysis/FeatureServer/0&lt;/A&gt;",&lt;BR /&gt;"distance": 100.0,&lt;BR /&gt;"units": "Meters",&lt;BR /&gt;"dissolveType": "Dissolve",&lt;BR /&gt;"outputName": {"serviceProperties": {"name": "LocationQueryResult"}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;task_url, job_info = analysis_job(analysis_url, task, token, params)&lt;BR /&gt;job_info = analysis_job_status(task_url, job_info, token)&lt;BR /&gt;job_values = analysis_job_results(task_url, job_info, token)&lt;/P&gt;&lt;P&gt;When I run it I get :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;importing
starting
Logging in
Getting token...
Getting Analysis URL...
Submitting analysis job...
{'jobId': 'jaf04b394ba164b9d8de5098228b2d6c3', 'jobStatus': 'esriJobSubmitted', 'results': {}, 'inputs': {}, 'messages': []}
{'jobId': 'jaf04b394ba164b9d8de5098228b2d6c3', 'jobStatus': 'esriJobFailed', 'results': {}, 'inputs': {}, 'messages': [{'type': 'esriJobMessageTypeError', 'description': '{"messageCode": "AO_100012", "message": "CreateBuffers failed."}'}, {'type': 'esriJobMessageTypeError', 'description': 'Failed to execute (CreateBuffers).'}, {'type': 'esriJobMessageTypeError', 'description': 'Failed.'}]}&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;---------------------------------------------------------------------------&lt;/SPAN&gt;
&lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;                                 Traceback (most recent call last)
&lt;SPAN class=""&gt;&amp;lt;ipython-input-34-708507b739fa&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class=""&gt;&amp;lt;module&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    175&lt;/SPAN&gt;         }
&lt;SPAN class=""&gt;    176&lt;/SPAN&gt; task_url&lt;SPAN class=""&gt;,&lt;/SPAN&gt; job_info &lt;SPAN class=""&gt;=&lt;/SPAN&gt; analysis_job&lt;SPAN class=""&gt;(&lt;/SPAN&gt;analysis_url&lt;SPAN class=""&gt;,&lt;/SPAN&gt; task&lt;SPAN class=""&gt;,&lt;/SPAN&gt; token&lt;SPAN class=""&gt;,&lt;/SPAN&gt; params&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;--&amp;gt; 177&lt;/SPAN&gt; job_info &lt;SPAN class=""&gt;=&lt;/SPAN&gt; analysis_job_status&lt;SPAN class=""&gt;(&lt;/SPAN&gt;task_url&lt;SPAN class=""&gt;,&lt;/SPAN&gt; job_info&lt;SPAN class=""&gt;,&lt;/SPAN&gt; token&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    178&lt;/SPAN&gt; job_values &lt;SPAN class=""&gt;=&lt;/SPAN&gt; analysis_job_results&lt;SPAN class=""&gt;(&lt;/SPAN&gt;task_url&lt;SPAN class=""&gt;,&lt;/SPAN&gt; job_info&lt;SPAN class=""&gt;,&lt;/SPAN&gt; token&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    179&lt;/SPAN&gt; 

&lt;SPAN class=""&gt;&amp;lt;ipython-input-34-708507b739fa&amp;gt;&lt;/SPAN&gt; in &lt;SPAN class=""&gt;analysis_job_status&lt;/SPAN&gt;&lt;SPAN class=""&gt;(task_url, job_info, token)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    112&lt;/SPAN&gt;                 print&lt;SPAN class=""&gt;(&lt;/SPAN&gt;job_response&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    113&lt;/SPAN&gt;                 &lt;SPAN class=""&gt;if&lt;/SPAN&gt; job_response&lt;SPAN class=""&gt;.&lt;/SPAN&gt;get&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"jobStatus"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;"esriJobFailed"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&lt;SPAN class=""&gt;--&amp;gt; 114&lt;/SPAN&gt;                     &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Job failed."&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    115&lt;/SPAN&gt;                 &lt;SPAN class=""&gt;elif&lt;/SPAN&gt; job_response&lt;SPAN class=""&gt;.&lt;/SPAN&gt;get&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"jobStatus"&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt; &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;"esriJobCancelled"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&lt;SPAN class=""&gt;    116&lt;/SPAN&gt;                     &lt;SPAN class=""&gt;raise&lt;/SPAN&gt; Exception&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;"Job cancelled."&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;

&lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;: Job failed.&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;There's very little here to go on for troubleshooting, any ideas to try and overcome this are most welcome!&lt;/P&gt;&lt;P&gt;Thanks in advance or any replies and insights!&lt;/P&gt;&lt;P&gt;Chuck&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 21:15:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getting-error-when-trying-to-create-buffer-using/m-p/1129281#M63364</guid>
      <dc:creator>ChuckBenton</dc:creator>
      <dc:date>2021-12-28T21:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting error when trying to Create Buffer using Analysis Services</title>
      <link>https://community.esri.com/t5/python-questions/getting-error-when-trying-to-create-buffer-using/m-p/1129290#M63365</link>
      <description>&lt;P&gt;Can you try setting this up in ModelBuilder and then export to python after successful ran and compare to your code?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 21:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/getting-error-when-trying-to-create-buffer-using/m-p/1129290#M63365</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2021-12-28T21:41:27Z</dc:date>
    </item>
  </channel>
</rss>

