I am writing a Python script using ArcPy and the Field Calculator function (code snippet below) and getting the following error message:
ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 1)
Is line 1 the first line of the code block or the line calling the code block?
netYield = """netYield(ISlimit,multiplier,PASSA,compZone):
x = ISlimit / multiplier
if PASSA == 0:
if compZone == "Office/Commercial":
if x < 16000:
return x
else:
return 16000
elif compZone == "Industrial":
if x < 111000:
return x
else:
return 111000
else:
return x
else:
return x"""
calcField(HDC,"NetYieldSQFT","netYield(!IS_limit!,!multiplier!,!PA_SSA!,!Comp_Zone!)", "PYTHON",netYield)
calcField
toarcpy.CalculateField_management
and adddef
at the beginning:netYield = """def netYiel...