AnsweredAssumed Answered

Invert where clause error on Select by attributes

Question asked by ckillian on Jul 7, 2020
Latest reply on Jul 7, 2020 by bixb0012

I am running a script that was exported directly from model builder in Pro.  It runs this select by attributes statement and gives me an error.

 

# Process: Select Layer By Attribute (Select Layer By Attribute)
DBO_wHydrantInspection_Layer, Count = arcpy.SelectLayerByAttribute_management(in_layer_or_view=GISDefault_DBO_wHydrantInspection, selection_type="NEW_SELECTION", where_clause="REPAIR = 'Yes'", invert_where_clause="")

 

Traceback (most recent call last):
File "H:\Python\HydrantRepairPro.py", line 25, in <module>
Model()
File "H:\Python\HydrantRepairPro.py", line 16, in Model
DBO_wHydrantInspection_Layer, Count = arcpy.SelectLayerByAttribute_management(in_layer_or_view=GISDefault_DBO_wHydrantInspection, selection_type="NEW_SELECTION", where_clause="REPAIR = 'Yes'", invert_where_clause="")
TypeError: SelectLayerByAttribute() got an unexpected keyword argument 'invert_where_clause'

 

 

Does anyone know why the invert  where cause is throwing an error?

Outcomes