<?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: TruncateTable_management throwing ERROR 000187 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/truncatetable-management-throwing-error-000187/m-p/592692#M46463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have accidentally found the error in my own code, my input feature class name was missing one character, so the script was unable to find the table to truncate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that I was thrown looking for something else by the error code/decription, when I should have checked the basics first...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had dragged the feature class into my code when running in ArcCatalog hence why it ran fine within.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for the views guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Nov 2014 05:28:29 GMT</pubDate>
    <dc:creator>BenVan_Kesteren1</dc:creator>
    <dc:date>2014-11-19T05:28:29Z</dc:date>
    <item>
      <title>TruncateTable_management throwing ERROR 000187</title>
      <link>https://community.esri.com/t5/python-questions/truncatetable-management-throwing-error-000187/m-p/592691#M46462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am playing around in python and am coming stuck with the arcpy.TruncateTable_management tool, as I can run it fine in the python window in Catalog, but when I run my py script it throws the below error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;Executing: TruncateTable "Database Connections\GISADMIN@SDE_Spatial@Smithy.sde\SDE_SPATIAL.GISADMIN.CAD_WSData_Sewer_DEV\Polygon_1"&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;Start Time: Wed Nov 19 16:07:29 2014&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;Failed to execute. Parameters are not valid.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;ERROR 000187: Only supports Geodatabase tables and feature classes&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;Failed to execute (TruncateTable).&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #909090;"&gt;&lt;EM&gt;Failed at Wed Nov 19 16:07:29 2014 (Elapsed Time: 0.03 seconds)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the below line in ArcCatalog it runs fine, no errors, and resultant table is empty as expected:&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.TruncateTable_management(r'Database Connections\GISADMIN@SDE_Spatial@Smithy.sde\SDE_SPATIAL.GISADMIN.CAD_WSData_Sewer_DEV\SDE_SPATIAL.GISADMIN.Poly&lt;SPAN style="color: #303030;"&gt;gon&lt;/SPAN&gt;1_1')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find that the error information is not valid as it is able to successfully run within catalog, but not within a py script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone come across this before? Its rather frustrating.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 05:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/truncatetable-management-throwing-error-000187/m-p/592691#M46462</guid>
      <dc:creator>BenVan_Kesteren1</dc:creator>
      <dc:date>2014-11-19T05:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: TruncateTable_management throwing ERROR 000187</title>
      <link>https://community.esri.com/t5/python-questions/truncatetable-management-throwing-error-000187/m-p/592692#M46463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have accidentally found the error in my own code, my input feature class name was missing one character, so the script was unable to find the table to truncate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that I was thrown looking for something else by the error code/decription, when I should have checked the basics first...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had dragged the feature class into my code when running in ArcCatalog hence why it ran fine within.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers for the views guys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 05:28:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/truncatetable-management-throwing-error-000187/m-p/592692#M46463</guid>
      <dc:creator>BenVan_Kesteren1</dc:creator>
      <dc:date>2014-11-19T05:28:29Z</dc:date>
    </item>
  </channel>
</rss>

