Hot answers tagged

3

Try to change your code to def calc(Wert1, Wert2, Wert3): if (Wert1 == None): return Wert2/Wert3 else: return Wert1


3

It appears you're mixing the syntax of the old arcpy.UpdateCursor() with the newer arcpy.da.UpdateCursor(). Try changing your cursor to be something like: updateFields = ["R_value", "G_value", "B_value", "C_value", "M_value", "Y_value", "K_value"] with arcpy.da.UpdateCursor(newtable, updateFields, query) as rows: for row in rows: row[0] = r ...



Only top voted, non community-wiki answers of a minimum length are eligible