I have a shapefile of a river network containing the following fields: toJunction, fromJunction, Int_DAM (which indicates free-flowing status) and Strahler. I'm trying to create a list of the rows where
Int_DAM = 'Downstream' using arcpy.da.SearchCursor. I'm getting an error that says:
RuntimeError: A column was specified that does not exist.
Here is the code as I have it:
Sel_list =  fc = r"C:\Data\Free_Flowing_Rivers_Results\NHN_Canada_Stream_Order_by_Basin_160412.gdb\Datasets\NHN_HN_PrimaryDirectedNLFlow_07_Stream_Order" fields = ['fromJunction', 'toJunction', 'Int_DAM', 'Strahler'] where_clause = '"Int_DAM"' + "=" + 'Downstream' with arcpy.da.SearchCursor(fc, (fields), where_clause) as cursor: for row in cursor: Sel_list.append(row) print Sel_list
I've double checked the file and the fields are definitely present. I'm pretty new to Python so I'm sure I'm missing something.