<?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 Custom Python tool Execution failure in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97949#M3379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've written couple of Python scripts that make operations to featurelayers and a table. Mostly some CRUD-operations based on the input of tools. Tools work well when they are executed from command line or in ArcMap. However, when published as a Geoprocessing service in ArcGIS server, they all fail to execute. According to ArcGIS server log, the problem is on creating Cursor objects:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; Executing (InsertRow): InsertRow 1 1 aaa # 2 1.1.2001 1.1.2001 # # # # A # # 0 # # # # 1.1.2001 1.1.2001 1.1.2001 0 0 0 # 0 Start Time: Tue Sep 11 14:09:26 2012 Running script InsertRow... : "C:\Documents and Settings\Administrator.ARCGIS\Application Data\ESRI\Desktop10.0\ArcCatalog\arcdata02.sde\sde.SDE.mobile\sde.SDE.task2" does not exist Failed to execute (InsertRow). Failed at Tue Sep 11 14:09:26 2012 (Elapsed Time: 0,00 seconds)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to with different forms of the connection string (absolute path to sde file, Path starting with "Database connection/&amp;lt;dataset name&amp;gt;/&amp;lt;feature class&amp;gt;), but none of these works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas to make the script work? I'm running ArcGIS server version 10.0.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 11:01:27 GMT</pubDate>
    <dc:creator>OlliWirpi</dc:creator>
    <dc:date>2012-09-11T11:01:27Z</dc:date>
    <item>
      <title>Custom Python tool Execution failure</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97949#M3379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've written couple of Python scripts that make operations to featurelayers and a table. Mostly some CRUD-operations based on the input of tools. Tools work well when they are executed from command line or in ArcMap. However, when published as a Geoprocessing service in ArcGIS server, they all fail to execute. According to ArcGIS server log, the problem is on creating Cursor objects:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt; Executing (InsertRow): InsertRow 1 1 aaa # 2 1.1.2001 1.1.2001 # # # # A # # 0 # # # # 1.1.2001 1.1.2001 1.1.2001 0 0 0 # 0 Start Time: Tue Sep 11 14:09:26 2012 Running script InsertRow... : "C:\Documents and Settings\Administrator.ARCGIS\Application Data\ESRI\Desktop10.0\ArcCatalog\arcdata02.sde\sde.SDE.mobile\sde.SDE.task2" does not exist Failed to execute (InsertRow). Failed at Tue Sep 11 14:09:26 2012 (Elapsed Time: 0,00 seconds)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to with different forms of the connection string (absolute path to sde file, Path starting with "Database connection/&amp;lt;dataset name&amp;gt;/&amp;lt;feature class&amp;gt;), but none of these works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas to make the script work? I'm running ArcGIS server version 10.0.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 11:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97949#M3379</guid>
      <dc:creator>OlliWirpi</dc:creator>
      <dc:date>2012-09-11T11:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Python tool Execution failure</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97950#M3380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcServer editing requires at least a ArcServer Standard license I believe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.esri.com/software/arcgis/arcgisserver/features/functionality-table"&gt;http://www.esri.com/software/arcgis/arcgisserver/features/functionality-table&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have that, it looks like your SDE connection file is referenced to the local profile. I would imagine that isn't how you want to set it up on your server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 14:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97950#M3380</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-09-11T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Python tool Execution failure</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97951#M3381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The licence is ArcGIS Server Enterprise so that shouldn't be the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you mean that the SDE file itself shouldn't be under local profile? I copied the file to the same directory where the Python files are, changed the script to use that file and tried again but came out with the same error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.env.workspace = "arcdata02.sde"

updateCur = arcpy.UpdateCursor("sde.SDE.mobile\\sde.SDE.task", sql)
insertCur = arcpy.InsertCursor("sde.SDE.history\\sde.SDE.task_history")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering why do the tools work when run from ArcCatalog, but not any more as published GPService.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97951#M3381</guid>
      <dc:creator>OlliWirpi</dc:creator>
      <dc:date>2021-12-11T06:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Python tool Execution failure</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97952#M3382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ArcGIS Server Enterprise doesn't tell you your license level, just the number of licenses and servers you can deploy to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.esri.com/software/arcgis/arcgisserver/features/functionality-table"&gt;http://www.esri.com/software/arcgis/arcgisserver/features/functionality-table&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also make sure you use UNC paths when executing scripts on a server. You are getting a "does not exist Failed to execute" error, so it seems it can't find your data more than a license level problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 12:50:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/custom-python-tool-execution-failure/m-p/97952#M3382</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-09-12T12:50:12Z</dc:date>
    </item>
  </channel>
</rss>

