<?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: Python Tool Error in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128770#M6947</link>
    <description>&lt;P&gt;What does this variable do?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Watershed = GetParameterAsText(7)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is a required variable, could you change the variable name to a different name (e.g. wshed). Variable name and function name shouldn't be same?&lt;/P&gt;</description>
    <pubDate>Fri, 24 Dec 2021 04:11:42 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2021-12-24T04:11:42Z</dc:date>
    <item>
      <title>Python Tool Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128768#M6946</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a python tool to generate watersheds at pourpoints and perform other geoprocessing to the watersheds. When I ran the tool, it keeps stopping at the arcpy.sa.Watershed() or&amp;nbsp;Watershed() in my script, with the following error message:&amp;nbsp;type error: str is not callable. Thanks for your help! Here is my script below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;import os&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;from arcpy import GetParameterAsText&lt;/P&gt;&lt;P&gt;#Check out any necessary licenses.&lt;BR /&gt;arcpy.CheckOutExtension("spatial")&lt;/P&gt;&lt;P&gt;#User's Input Parameters&lt;BR /&gt;inPourPoint = GetParameterAsText(0)&lt;BR /&gt;pptField=GetParameterAsText(1)&lt;BR /&gt;snapDistance = GetParameterAsText(2)&lt;BR /&gt;inAccumRaster = GetParameterAsText(3)&lt;BR /&gt;inFlowDir = GetParameterAsText(4)&lt;BR /&gt;Boundary= GetParameterAsText(5)&lt;BR /&gt;SmWS = GetParameterAsText(6)&lt;BR /&gt;Watershed = GetParameterAsText(7)&lt;BR /&gt;ScaleRatioTable = GetParameterAsText(8)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#def Watershed(inPourPoint,inAccumRaster,snapDistance,inFlowDir,pptField)&lt;/P&gt;&lt;P&gt;#Snapping the pour points to the locations of highest accumulation within the tolerance(snap_distance)&lt;BR /&gt;PourPoint_snap = SnapPourPoint(inPourPoint, inAccumRaster,snapDistance,pptField)&lt;BR /&gt;PourPoint_snap.save&lt;/P&gt;&lt;P&gt;#Generating the drainage basin raster&lt;BR /&gt;inPPTSnap_Field = "Value"&lt;BR /&gt;Watershed_Raster = Watershed(inFlowDir,PourPoint_snap,inPPTSnap_Field)&amp;nbsp; &amp;nbsp;#error occurs here&lt;BR /&gt;Watershed_Raster.save&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 03:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128768#M6946</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2021-12-24T03:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Tool Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128770#M6947</link>
      <description>&lt;P&gt;What does this variable do?&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Watershed = GetParameterAsText(7)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is a required variable, could you change the variable name to a different name (e.g. wshed). Variable name and function name shouldn't be same?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 04:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128770#M6947</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2021-12-24T04:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Tool Error</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128796#M6948</link>
      <description>&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633" target="_blank"&gt;Code formatting ... the Community Version - Esri Community&lt;/A&gt;&amp;nbsp;would help with potential format errors as well&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 13:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-tool-error/m-p/1128796#M6948</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-24T13:26:45Z</dc:date>
    </item>
  </channel>
</rss>

