I am trying to run a python script for kriging, but keep getting a following error message. It doesn't make any sense as the output variance prediction raster is optional.

The code:

# Create KrigingModelOrdinary Object
lagSize = 70000
majorRange = 250000
partialSill = 180000
nugget = 34000
kModelOrdinary = arcpy.sa.KrigingModelOrdinary("CIRCULAR", lagSize, majorRange,                                               partialSill, nugget)
RadiusVariable = 12
# Local variables:
Stations2010o3Data__2_ = "C:\\outVarRaster = ""
fields = ['O3_avg_dai', 'O3_avg_d_1', 'O3_avg_d_2', 'O3_avg_d_3', 'O3_avg_d_4', 'O3_avg_d_5', 'O3_avg_d_6', 'O3_avg_d_7', 'O3_avg_d_8', 'O3_avg_d_9', 'O3_avg__10', 'O3_avg__11', 'O3_avg__12', 'O3_avg__13',   'O3_avg__14', 'O3_avg__15', 'O3_avg__16', 'O3_avg__17', 'O3_avg__18', 'O3_avg__19', 'O3_avg__20', 'O3_avg__21', 'O3_avg__22', 'O3_avg__23', 'O3_avg__24', 'O3_avg__25', 'O3_avg__26', 'O3_avg__27', 'O3_avg__28', 'O3_avg__29', 'O3_avg__30', 'O3_avg__31', 'O3_avg__32', 'O3_avg__33', 'O3_avg__34', 'O3_avg__35', 'O3_avg__36', 'O3_avg__37', 'O3_avg__38', 'O3_avg__39', 'O3_avg__40', 'O3_avg__41', 'O3_avg__42', 'O3_avg__43', 'O3_avg__44', 'O3_avg__45', 'O3_avg__46', 'O3_avg__47']
for field in fields:
    counter += 1
    count_file = open("counter.txt", "w")
# Process: Kriging
    tempEnvironment0 = arcpy.env.extent
    arcpy.env.extent = "56662.1788730418 308952.917606764 1698384.17317964 1912328.52737378"
    rasterKrig = "run{}_Krig_{}".format(counter, field)
    outKrig = arcpy.sa.Kriging(Stations2010o3Data__2_, field, kModelOrdinary, {2000}, RadiusVariable, outVarRaster)
    arcpy.env.extent = tempEnvironment0

The error message:

Runtime error
Traceback (most recent call last):
File "", line 54, in
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 2405, in Kriging out_variance_prediction_raster)
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper result = wrapper(*args, **kwargs)
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 2397, in wrapper
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing_base.py", line 484, in
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: Object: Error in executing tool

closed as off-topic by PolyGeo Dec 4 '16 at 22:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.