Solved! Go to Solution.
result = int(arcpy.GetCount_management(Variable1).getOutput(0))
del addRow
Does the empty table have the fields you are trying to populate?
result = int(arcpy.GetCount_management(Variable1).getOutput(0))
del addRow
Result is not an integer you can compare how you are. You need this.result = int(arcpy.GetCount_management(Variable1).getOutput(0))
Also don't forget to add this at the end of your script.del addRow
type(variable) repr(variable)
>>> result = arcpy.GetCount_management(fc) >>> type(result) <class 'arcpy.arcobjects.arcobjects.Result'> >>> repr(result) "<Result '60'>"
>>> result = arcpy.GetCount_management(fc).getOutput(0) >>> type(result) <type 'unicode'> >>> repr(result) "u'60'"
>>> result = int(arcpy.GetCount_management(fc).getOutput(0)) >>> type(result) <type 'int'> >>> repr(result) '60'