AnsweredAssumed Answered

AttributeError: 'float' object has no attribute 'setValue'

Question asked by jplay on Jun 10, 2013
Latest reply on Jun 10, 2013 by jplay
I'm hoping someone can tell me whats going on with the below bit of code. I keep getting the error

AttributeError: 'float' object has no attribute 'setValue'

and I'm not sure how to resolve it. Can someone please explain?

    NONFLOOD = "GRIDfield"
    NF1curs = arcpy.UpdateCursor(BuildingGridSelect)
    for nf1row in NF1curs:
        nf1val = nf1row.getValue(NONFLOOD)
        if nf1val < 0:
            nf1val.setValue(NONFLOOD, 0)

nf1val may result in a negative float value (e.g. -2.32076), but what is the correct syntax to update the value to 0?