I'm trying to create an individual buffer feature class for each column of an input feature class, where there is a field that contains the buffer distance.
I think there is a problem with my SQL statement because in the inner loop to access the field with the buffer length I get this error:
"for buf in loop2:RuntimeError: A column was specified that does not exist."
Any suggestions? Note I also tried: query = ' "UNIQUEID" = ' + str(id[0])
Here is my code:
###loop through field value of nest number, AKA "UNIQUEID"fc1 = BEN_inputfield1 = "UNIQUEID"with arcpy.da.SearchCursor(fc1, (field1)) as loop1: for id in loop1: #extract out individual nest query = "UNIQUEID" + "=" + str(id[0]) arcpy.MakeFeatureLayer_management(BEN_input, "BEN", query) ##clip water to buffer size #access buffer size fc2 = "BEN" field2 = "best_buf" with arcpy.da.SearchCursor(fc2, (field2)) as loop2: for buf in loop2: water_buf_size = buf #buffer nest arcpy.Buffer_analysis(BEN, "BEN_buf", water_buf_size)
أكثر...
I think there is a problem with my SQL statement because in the inner loop to access the field with the buffer length I get this error:
"for buf in loop2:RuntimeError: A column was specified that does not exist."
Any suggestions? Note I also tried: query = ' "UNIQUEID" = ' + str(id[0])
Here is my code:
###loop through field value of nest number, AKA "UNIQUEID"fc1 = BEN_inputfield1 = "UNIQUEID"with arcpy.da.SearchCursor(fc1, (field1)) as loop1: for id in loop1: #extract out individual nest query = "UNIQUEID" + "=" + str(id[0]) arcpy.MakeFeatureLayer_management(BEN_input, "BEN", query) ##clip water to buffer size #access buffer size fc2 = "BEN" field2 = "best_buf" with arcpy.da.SearchCursor(fc2, (field2)) as loop2: for buf in loop2: water_buf_size = buf #buffer nest arcpy.Buffer_analysis(BEN, "BEN_buf", water_buf_size)
أكثر...