crash/error out in arcpy - Create Random Points

المشرف العام

Administrator
طاقم الإدارة
I'm trying to deal with an odd crash that occurs irregularly in arcGIS's arcpy, specifically under the create random points tool.

This occurs under ArcGIS 10.1 to 10.3.

During "CreateRandomPoints", the program attempts to create by polygon a number of points in the polygon, the number dictated by a field. The problem I experience is that occasionally, upon attempting this line, python will immediately crash without giving an error code.

I accept that it's a known issue. I accept that there's nothing to be done about the crash itself, other than working around it. the problem is, i can't seem to catch the error and work around it.

I have embedded the code chunk containing

arcpy.CreateRandomPoints_management(wkspc,outshape,shape,,field)inside of a try/except block. I have set up a logic where hopefully the code would execute (and if necessary, fail) 5 times before exiting the program with an informative error. However, it only runs once, and exits the program without stating the error. (my try/except block isn't catching the error).

I have tried every error code I can think relevant, even a naked except block which to my knowledge should catch everything.

Is there some other means to catch the error? something i haven't tried yet?



أكثر...
 
أعلى