wmarcell

9.2 to 10.0 python error calculateField_Management

Discussion created by wmarcell on Dec 9, 2011
Latest reply on Dec 11, 2011 by lpinner
Hello,
I was given the task of converting a legacy python script that was written for 9.2 to a version that will function in 10.0.  I have varified that the script works when run on 9.2.  When I attempt to run the script in version 10.0 I am getting an error 99999 in regards to the calculateField_management command.  I have used python quite a bit but am no expert.  I attempted to use the arcpy module as well as stating in the script that gp = arcgisscripting.create(9.2) to no avail.  I am attempting to aviod rewriting the entire script however this may not be possible.  If anyone is knowledgeable on the differences between 9.2 and 10.0 especially in regard to the calculate field command I would greatly appreciate feedback.  If there are any pointers with migrating legacy scripts with minimal headache I would also appreciate those pointers.  My code is attached below (too long for C/P).  I also attached the GP log.

LOG:
Executing (NRCS_Hydro_Script_v92 (2)): NRCS_Hydro_Script_v92 E:\Hydrologic_Modeling\Primary_Inputs\KY_Pilot_LiDAR_Model_INPUTS.gdb\Other_INPUTS\Sample_Analysis_Point E:\Hydrologic_Modeling\Primary_Inputs\LookupTables\KY_GOOD-Condition-Lookup.dbf
Start Time: Fri Dec 09 15:54:44 2011
Running script NRCS_Hydro_Script_v92...
Checked out Spatial Analyst License successfully
Created workspace Hydrologic_Modeling\Project_Results_GDB successfully
Ran Setup Model for Analysis Site successfully - Beginning Watershed-Flow Model - Please wait...
<class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function.
Failed to execute (CalculateField).

Failed to execute (NRCS_Hydro_Script_v92 (2)).
Failed at Fri Dec 09 15:58:41 2011 (Elapsed Time: 3 minutes 57 seconds)

Outcomes