dimanche 1 février 2015

Buffering continuously throws error "Background Server Threw an Exception" (Error 001143). Why?


I have written a code to create 1 meter buffers for features of converted feature classes (from rasters). I want to dissolve by the field "Class" so that I will have significantly smaller datasets to work with because the converted feature classes are far to large to do much with. I was able to do the first one using the GUI so it is possible but when I try to run my code I get error 001143. The error does not pop up right away, instead I see it about an hour after execution (the first file is pretty big). I do get the message "[file] is ready for buffer" (Line 13). The error message says the problem is in line 17 which is when I execute the buffer. Are my buffer parameters incorrect? I disabled background processing but nothing changed. I am happy to hear any suggestions and answer questions that you may have.



import os
arcpy.env.workspace = r"C:\Data\ConvertedPolygons.gdb"
arcpy.env.overwriteOutput = True
arcpy.env.addOutputsToMap = False
polygdb = arcpy.ListFeatureClasses()
for fc in polygdb:
name = fc.split(".")[0]
if "Test" in name:
print fc + " was skipped"
elif "merge" in name:
print fc + " was skipped"
else:
print fc + " ready for buffer"
outws = r"C:\Data\BufferedPoly.gdb"
outfc = name + "_buff"
outfile = os.path.join(outws, outfc)
arcpy.Buffer_analysis(fc, outfile, "1 Meter", "FULL", "ROUND", "LIST", "Class" )




Aucun commentaire:

Enregistrer un commentaire