Solved! Go to Solution.
000856 : An error was encountered while executing <value>.
Resource Center
Description
There was a problem encountered while executing the specified tool. There are several possible causes for this situation, so you might need to investigate several possibilities to resolve it.
Solution
Check that the syntax is correct, the input datasets exist as specified and are valid, and that you are able to write to the output location.
Ensure that you have sufficient resources on your machine to complete the process.
Check the documentation for any notes or usage tips that may apply.
Contact technical support for assistance if you still cannot resolve the problem.
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # SplineExampleScript.py # Created on: 2012-03-01 14:43:43.00000 # (generated by ArcGIS/ModelBuilder) # Usage: SplineExampleScript <selection0> <Z_value_field> <Spline_sele37> # Description: # --------------------------------------------------------------------------- # Import arcpy module import arcpy, os # Check out any necessary licenses arcpy.CheckOutExtension("spatial") # Script arguments selection0 = arcpy.GetParameterAsText(0) if selection0 == '#' or not selection0: selection0 = "selection0" # provide a default value if unspecified Z_value_field = arcpy.GetParameterAsText(1) if Z_value_field == '#' or not Z_value_field: Z_value_field = "inmval" # provide a default value if unspecified # overwrite existing files arcpy.gp.overwriteOutput = 1 # Local variables: Spline_sele37 = os.path.join(arcpy.env.scratchWorkspace, "scratch.gdb\\result") # Process: Spline try: arcpy.gp.Spline_sa(selection0, "inmval", Spline_sele37) except Exception as e: msgs = arcpy.GetMessages(2) arcpy.AddError(msgs) arcpy.AddError(e.message) sys.exit() arcpy.SetParameter(2, Spline_sele37)