hegipin

Exporting Model from Model Builder

Discussion created by hegipin on Aug 9, 2011
Latest reply on Aug 9, 2011 by smehta-esristaff
Hello

I'm trying to export a Field Calculator Function which is running fine in Model Builder to Python in order to use it further within a script.

But when I try to run it within the script I get the following error message:

<class 'arcgisscripting.ExecuteError'>: ERROR 000539: Error running expression: calculate_angles(84.3969887378542) <type 'exceptions.TypeError'>: unsupported operand type(s) for -: 'int' and 'unicode'
Failed to execute (CalculateField).

Does anybody know how to solve this error?
I tryed mapping all the datatypes to float (or double) within the function without success.
And as arcpy.AddMessage is not working within the python function, debugging the script is really annoying.

Thanks for any help!

Outcomes