rgthurau

Empty feature class warning resolved by restart

Discussion created by rgthurau on Aug 29, 2012
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.

This is the code that breaks Python:
arcpy.env.workspace = LCOutDir
RasList = arcpy.ListRasters("ProcGrid*5class","")
print RasList
for ras in RasList:
    print "Converting " + str(ras) + " to vector."
    arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value") 


Here is the error:

Traceback (most recent call last):
  File "E:\TV\01_Python\LandCover\rtc_LC_2.1 CombineVIS_and_Tile_081312.py", line 122, in <module>
    arcpy.RasterToPolygon_conversion(ras, LCFinOut + "/" + str(ras), "NO_SIMPLIFY", "Value")
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 134, in RasterToPolygon
    raise e
ExecuteError: ERROR 010151: No features found in E:\TV_VIS_Final.gdb\ProcGrid_1_buf_5class. Possible empty feature class.
Failed to execute (RasterToPolygon).

Line 122 is the RasterToPolygon_conversion tool.

I can post the entire code if anyone is interested or thinks it is necessary.

Thanks for taking a look!

Rich

Outcomes