<?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: Web Tool Error: Failed to read the output parameter (Code: 500) in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1680802#M43728</link>
    <description>&lt;P&gt;Hey David,&lt;/P&gt;&lt;P&gt;I took a closer look at this and think the way we are logging in is causing issues.&lt;/P&gt;&lt;P&gt;Using "home" will just pass through whatever login account we have currently signed in, which will work within a Notebook, but not within a Web Tool via the REST Endpoint.&lt;/P&gt;&lt;P&gt;For this I think it would be best to setup an Oauth2 item in your portal, with just enough capability to do the scripted workflow, then pass its Client ID into your script.&lt;/P&gt;&lt;P&gt;The following doc provides a &lt;A href="https://developers.arcgis.com/python/latest/guide/working-with-different-authentication-schemes/#:~:text=as%3A%20username%40DOMAIN-,User%20authentication%20with%20OAuth%202.0,-The%20ArcGIS%20Python" target="_self"&gt;sample&lt;/A&gt; for this.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jan 2026 16:46:11 GMT</pubDate>
    <dc:creator>David_McRitchie</dc:creator>
    <dc:date>2026-01-29T16:46:11Z</dc:date>
    <item>
      <title>Web Tool Error: Failed to read the output parameter (Code: 500)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1676072#M43650</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;I am trying to create a custom web tool from a notebook but am receiving the following error when trying to execute:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DavidT___1-1767708463739.png" style="width: 735px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/146322iCC26172A617B7E37/image-dimensions/735x45?v=v2" width="735" height="45" role="button" title="DavidT___1-1767708463739.png" alt="DavidT___1-1767708463739.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The end goal is to execute this web tool from Experience Builder and display output on the web map. I have tried executing the web tool from Experience Builder, a web map, and the REST URL of the web tool. The tool says it runs successfully in all three, but there is no output generated and the above error is returned.&lt;/P&gt;&lt;P&gt;I was able execute the same web tool in AGOL and successfully produce the expected output.&lt;/P&gt;&lt;P&gt;Below is example code that reproduces the error.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
from arcgis import create_buffers

gis = GIS('home')

# default vaule for input point
input_point = {
    'geometryType': 'esriGeometryPoint',
    'spatialReference': {
        'wkid': 4326
    },
    'fields': [
        {
            'name': 'id',
            'type': 'esriFieldTypeOID',
            'alias': 'ID'
        },
        {
            'name': 'Name',
            'type': 'esriFieldTypeString',
            'alias': 'Name'
        }
    ],
    'features': [
        {
            'geometry': {
                'x': -117.195695233,
                'y': 34.0560864,
                'spatialReference': {
                    'wkid': 4326
                }
            },
            'attributes': {
                'id': 2,
                'Name': 'Test'
            }
        }
    ]
}
distance = 2

buffer_areas = create_buffers(
    input_point,
    distances=[distance],
    units='Miles'
)

output_areas = buffer_areas.query()

# Inserted snippet writes output parameter file for web tool execution
import os
# Only run this snippet during web tool execution when env variable "ENB_JOBID" will be present
if "ENB_JOBID" in os.environ:
    out_param_name = "output_areas"
    out_param_file = os.path.join(
        os.environ["ENB_JOBID"], "value_" + out_param_name + ".dat")
    with open(out_param_file, "w") as writer:
        writer.write(str(output_areas))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Enterprise 11.3 and Python 3 Advanced Runtime - 10.0&lt;/P&gt;&lt;P&gt;Also, if you know of any good documentation / tutorials for authoring web tools using Python, that would be greatly appreciated! I've been searching but haven't found anything too helpful yet.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jan 2026 14:17:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1676072#M43650</guid>
      <dc:creator>DavidT__</dc:creator>
      <dc:date>2026-01-06T14:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Web Tool Error: Failed to read the output parameter (Code: 500)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1676379#M43658</link>
      <description>&lt;P&gt;Hey David,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Difficult to say from just a surface look but given its an error with the output parameter I would focus on lines 48, 55 - 56. Presumably there is something about the output object that cannot be reached or read.&lt;/P&gt;&lt;P&gt;I would agree with the resources, it can be difficult to find helpful guides. The following resource is a tad dated but the principles still remain and might be useful to you -&amp;nbsp;&lt;A href="https://mediaspace.esri.com/media/t/1_w3z627j3" target="_blank"&gt;https://mediaspace.esri.com/media/t/1_w3z627j3&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I have a 11.3 test environment so will try test this later when I get a bit more time to sit down with it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best of luck in the meantime,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 17:00:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1676379#M43658</guid>
      <dc:creator>David_McRitchie</dc:creator>
      <dc:date>2026-01-07T17:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Web Tool Error: Failed to read the output parameter (Code: 500)</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1680802#M43728</link>
      <description>&lt;P&gt;Hey David,&lt;/P&gt;&lt;P&gt;I took a closer look at this and think the way we are logging in is causing issues.&lt;/P&gt;&lt;P&gt;Using "home" will just pass through whatever login account we have currently signed in, which will work within a Notebook, but not within a Web Tool via the REST Endpoint.&lt;/P&gt;&lt;P&gt;For this I think it would be best to setup an Oauth2 item in your portal, with just enough capability to do the scripted workflow, then pass its Client ID into your script.&lt;/P&gt;&lt;P&gt;The following doc provides a &lt;A href="https://developers.arcgis.com/python/latest/guide/working-with-different-authentication-schemes/#:~:text=as%3A%20username%40DOMAIN-,User%20authentication%20with%20OAuth%202.0,-The%20ArcGIS%20Python" target="_self"&gt;sample&lt;/A&gt; for this.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jan 2026 16:46:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/web-tool-error-failed-to-read-the-output-parameter/m-p/1680802#M43728</guid>
      <dc:creator>David_McRitchie</dc:creator>
      <dc:date>2026-01-29T16:46:11Z</dc:date>
    </item>
  </channel>
</rss>

