Hello,
I keep receiving a 000358 error on my select by attribute function. I know it is the SQL in the selection query but I am so lost on what I should do to fix it.
Essentially, the purpose of the script is to utilize the the names of school districts in the "SCHOOL_DIS" attribute column in a shape file, and preform a buffer around each individual district to produce its own shape file, so one school district buffer per shape file.
with arcpy.da.SearchCursor (input_shape, ["SCHOOL_DIS"]) as cursor:
for row in cursor:
district_name = row[0]
selection_query = "SCHOOL_DIS = " + district_name
arcpy.management.SelectLayerByAttribute (input_shape, "NEW_SELECTION", selection_query, "")
outputfile = os.path.join(path, "{}_buf_5mile.shp".format(district_name))
arcpy.analysis.Buffer (input_shape, outputfile, "5 Miles", "","","","","")