ERROR
ArcGIS for Local Government's Target Hazard Analysis tool 'Create Cell Site Features' returns the following error if there are 10 or fewer cell sites:
"ZeroDivisionError: integer division or modulo by zero"
If there are 10 or fewer cell sites in the spreadsheet, the progress bar cannot be incremented correctly.
Code:
if increment == 0:
increment = 1
In the context of the surrounding lines of code this will look like the following:
Code:
# For each tower, create antennas and sectors within the radius.
cnt = arcpy.management.GetCount(cell_towers)
increment = int(int(cnt[0]) / 10.0)
if increment == 0:
increment = 1
arcpy.SetProgressor("Step", "Creating Cell site features...", 0, int(cnt[0]), increment)
Get help from ArcGIS experts
Download the Esri Support App