<?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 Unable to delete rows via script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5734#M502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to run a Python script on a Windows Server Enterprise 2008, SP2 machine. I am able to successfully run this script from my own machine (Windows 7) but once I move it over to the server the script stalls at the point of arcpy.DeleteRows_management. I thought perhaps there was a permissions issue... This script was generated from a model I built in ArcMap, if I open the model via ArcMap on the server I am able to run the delete rows step. I stepped through running my script, commenting each different action out, when I have it try to do only the delete rows action Idle just hangs and goes to Not Responding. The script is able to do all the other actions, make the event layer, append, compress and analyze. This is the first script I am working with, any advice in troubleshooting this issue is much appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Import arcpy module
import arcpy, arcgisscripting


# Local variables:
vw_nm_specimen_latlong_csv = "\\\\GIS\\c$\\TEMP\\vw_nm_specimen_latlong.csv"
GIS_NMBCC = "C:\\Inetpub\\wwwroot\\nmbcc\\python\\GIS_NMBCC@gis.sde\\GIS_NMBCC.GIS_NMBCC.data_nmbcc"
vw_nm_specimen_event = "in_memory\\vw_nm_specimen_event"
sde_connection = "C:\\Inetpub\\wwwroot\\nmbcc\\python\\SDE@gis.sde"

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(vw_nm_specimen_latlong_csv, "declong", "declat", vw_nm_specimen_event, "", "")

# Process: Delete Rows
arcpy.DeleteRows_management(GIS_NMBCC)

# Process: Append
arcpy.Append_management("in_memory\\vw_nm_specimen_event", GIS_NMBCC, "NO_TEST", "specimenid \"specimenid\" true true false 4 Long 0 10 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,specimenid,-1,-1;sciname \"sciname\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,sciname,-1,-1;museumcol \"museumcol\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,museumcol,-1,-1;catnumtxt \"catnumtxt\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,catnumtxt,-1,-1;country \"country\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,country,-1,-1;stateprov \"stateprov\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,stateprov,-1,-1;county \"county\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,county,-1,-1;locality \"locality\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,locality,-1,-1;declat \"declat\" true true false 8 Double 8 38 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,declat,-1,-1;declong \"declong\" true true false 8 Double 8 38 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,declong,-1,-1;georefmet \"georefmet\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,georefmet,-1,-1;vcolldate \"vcolldate\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,vcolldate,-1,-1;latlongcomments \"latlongcomments\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,latlongcomments,-1,-1;originalcoordinatesystem \"originalcoordinatesystem\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,originalcoordinatesystem,-1,-1", "")

# Process: Compress
arcpy.Compress_management(sde_connection)

# Process: Analyze
arcpy.Analyze_management(GIS_NMBCC, "BUSINESS;FEATURE;ADDS;DELETES")

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2011 16:56:40 GMT</pubDate>
    <dc:creator>LisaArnold</dc:creator>
    <dc:date>2011-07-28T16:56:40Z</dc:date>
    <item>
      <title>Unable to delete rows via script</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5734#M502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to run a Python script on a Windows Server Enterprise 2008, SP2 machine. I am able to successfully run this script from my own machine (Windows 7) but once I move it over to the server the script stalls at the point of arcpy.DeleteRows_management. I thought perhaps there was a permissions issue... This script was generated from a model I built in ArcMap, if I open the model via ArcMap on the server I am able to run the delete rows step. I stepped through running my script, commenting each different action out, when I have it try to do only the delete rows action Idle just hangs and goes to Not Responding. The script is able to do all the other actions, make the event layer, append, compress and analyze. This is the first script I am working with, any advice in troubleshooting this issue is much appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Import arcpy module
import arcpy, arcgisscripting


# Local variables:
vw_nm_specimen_latlong_csv = "\\\\GIS\\c$\\TEMP\\vw_nm_specimen_latlong.csv"
GIS_NMBCC = "C:\\Inetpub\\wwwroot\\nmbcc\\python\\GIS_NMBCC@gis.sde\\GIS_NMBCC.GIS_NMBCC.data_nmbcc"
vw_nm_specimen_event = "in_memory\\vw_nm_specimen_event"
sde_connection = "C:\\Inetpub\\wwwroot\\nmbcc\\python\\SDE@gis.sde"

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(vw_nm_specimen_latlong_csv, "declong", "declat", vw_nm_specimen_event, "", "")

# Process: Delete Rows
arcpy.DeleteRows_management(GIS_NMBCC)

# Process: Append
arcpy.Append_management("in_memory\\vw_nm_specimen_event", GIS_NMBCC, "NO_TEST", "specimenid \"specimenid\" true true false 4 Long 0 10 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,specimenid,-1,-1;sciname \"sciname\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,sciname,-1,-1;museumcol \"museumcol\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,museumcol,-1,-1;catnumtxt \"catnumtxt\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,catnumtxt,-1,-1;country \"country\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,country,-1,-1;stateprov \"stateprov\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,stateprov,-1,-1;county \"county\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,county,-1,-1;locality \"locality\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,locality,-1,-1;declat \"declat\" true true false 8 Double 8 38 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,declat,-1,-1;declong \"declong\" true true false 8 Double 8 38 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,declong,-1,-1;georefmet \"georefmet\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,georefmet,-1,-1;vcolldate \"vcolldate\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,vcolldate,-1,-1;latlongcomments \"latlongcomments\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,latlongcomments,-1,-1;originalcoordinatesystem \"originalcoordinatesystem\" true true false 255 Text 0 0 ,First,#,Z:\\TEMP\\vw_nm_specimen_latlong.csv,originalcoordinatesystem,-1,-1", "")

# Process: Compress
arcpy.Compress_management(sde_connection)

# Process: Analyze
arcpy.Analyze_management(GIS_NMBCC, "BUSINESS;FEATURE;ADDS;DELETES")

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 16:56:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5734#M502</guid>
      <dc:creator>LisaArnold</dc:creator>
      <dc:date>2011-07-28T16:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to delete rows via script</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5735#M503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What error messages are you receiving?&amp;nbsp; You can add the try...except block to you code to retrieve the error messages.&amp;nbsp; Ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.DeleteRows_management(GIS_NMBCC)
except arcpy.ExecuteError:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5735#M503</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T20:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to delete rows via script</title>
      <link>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5736#M504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Having the same issue!&amp;nbsp; Running against a SQL Express gdb.&amp;nbsp; I can append to the table but DeleteRows_management hangs indefinitely.&amp;nbsp; There is no error to catch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 22:07:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unable-to-delete-rows-via-script/m-p/5736#M504</guid>
      <dc:creator>SolanaFoo4</dc:creator>
      <dc:date>2018-01-10T22:07:41Z</dc:date>
    </item>
  </channel>
</rss>

