AnsweredAssumed Answered

Arcpy Bug? loop error ..runs great for 899 iterations and then fails at the 900th

Question asked by sayshere on Mar 1, 2012
Latest reply on Mar 2, 2012 by clm42
Before it breaks, my script does this in a loop:

for i in range (1, 2000):

if ID = i:

step 1: export one point whose ID = i, feature class to feature class
step 2: make polygon, 500 meter buffer around the point
step 3: clip a raster with the polygon from step 2
step 4: do a bunch of spatial analysis on the clipped raster
step 5: export a table with stats from step 4

The loop breaks at step 2 after the 900th iteration, which is just about 1/2 way to completion.

Here is the error message:
'File "C:\Programmer\ArcGIS\Desktop10.0\arcpy\arcpy\", line 7692, in Clip
   raise e
arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Clip). Parameters are not valid.
ERROR 000628: Cannot set input into parameter rectangle.

The errors makes sense only because step 2 does not produce a polygon after the 900th time through the loop. Question is, why no polygon?