<?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 Empty feature class warning resolved by restart in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/empty-feature-class-warning-resolved-by-restart/m-p/391665#M30951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a raster code that successfully moves through many lines but fails at a particular point. Without changing anything in the running section of the code (I do comment out stuff that ran), the code runs successfully after restarting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code that breaks Python:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.env.workspace = LCOutDir
RasList = arcpy.ListRasters("ProcGrid*5class","")
print RasList
for ras in RasList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Converting " + str(ras) + " to vector."
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value") &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "E:\TV\01_Python\LandCover\rtc_LC_2.1 CombineVIS_and_Tile_081312.py", line 122, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 134, in RasterToPolygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 010151: No features found in E:\TV_VIS_Final.gdb\ProcGrid_1_buf_5class. Possible empty feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (RasterToPolygon).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Line 122 is the RasterToPolygon_conversion tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can post the entire code if anyone is interested or thinks it is necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for taking a look!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 18:20:06 GMT</pubDate>
    <dc:creator>RichardThurau</dc:creator>
    <dc:date>2012-08-29T18:20:06Z</dc:date>
    <item>
      <title>Empty feature class warning resolved by restart</title>
      <link>https://community.esri.com/t5/python-questions/empty-feature-class-warning-resolved-by-restart/m-p/391665#M30951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a raster code that successfully moves through many lines but fails at a particular point. Without changing anything in the running section of the code (I do comment out stuff that ran), the code runs successfully after restarting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the code that breaks Python:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.env.workspace = LCOutDir
RasList = arcpy.ListRasters("ProcGrid*5class","")
print RasList
for ras in RasList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Converting " + str(ras) + " to vector."
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value") &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "E:\TV\01_Python\LandCover\rtc_LC_2.1 CombineVIS_and_Tile_081312.py", line 122, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 134, in RasterToPolygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExecuteError: ERROR 010151: No features found in E:\TV_VIS_Final.gdb\ProcGrid_1_buf_5class. Possible empty feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (RasterToPolygon).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Line 122 is the RasterToPolygon_conversion tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can post the entire code if anyone is interested or thinks it is necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for taking a look!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rich&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 18:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/empty-feature-class-warning-resolved-by-restart/m-p/391665#M30951</guid>
      <dc:creator>RichardThurau</dc:creator>
      <dc:date>2012-08-29T18:20:06Z</dc:date>
    </item>
  </channel>
</rss>

