result = int(arcpy.GetCount_management(Variable1).getOutput(0))
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'
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
Does the empty table have the fields you are trying to populate?
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.