I am using the Calculate Field tool in model builder. I am new to Python, but modeled my code after something I had done in a previous model that worked well. Despite following similar syntax and rules, I am given an error message I don't recognize (see attachments). I’ve tried looking up similar issues and have not been able to find a solution. Current Depth contains numerical data.
Any insight would be appreciated.
Here is my code:
def assignValue(DWType, CurrentDepth):
if DWType == 'single':
Value = ((90 - CurrentDepth) / 90) * 100
if DWType == 'double':
Value = ((140 - CurrentDepth) / 140) * 100
if DWType == 'triple':
Value = ((190 - CurrentDepth) / 190) * 100
return Value
Codeblock:
assginValue( !DRYW_DEPTH!, !Cur_BotDep!)