Problem with FillSinks in Python script

2904
1
05-15-2013 07:57 AM
Labels (1)
JacobCoble
New Contributor
We're running a number of preprocessing tools in ArcHydro, including FillSinks. All of the other tools we are using work, but when the python script calls FillSinks:

# Process: Fill Sinks
ArcHydroTools.FillSinks(AgreeDEM, Fil, "", LevelPoly, "ISSINK_YES")

we get this error message:

Traceback (most recent call last):
  File "U:\ArcHydro\ArcHydroPhilip\AutoHydro_beta2.py", line 101, in <module>
    ArcHydroTools.FillSinks(AgreeDEM, Fil, "", LevelPoly, "ISSINK_YES")
  File "C:\Program Files\ESRI\WaterUtils\ArcHydro\bin\ArcHydroTools.py", line 2319, in FillSinks
    raise e
ExecuteError: System.NullReferenceException: Object reference not set to an instance of an object.

   at ESRI.APWR.ArcHydroGPTools.AHFillSinks.Execute(IArray paramvalues, ITrackCancel trackcancel, IGPEnvironmentManager envMgr, IGPMessages message) in C:\Builds\HydroSolutions\10.0_ArcHydro\Sources\ArcHydroTools\src\ArcHydroGPTools\AHFillSinks.vb:line 398
Failed to execute (FillSinks).

We're not sure why this is occurring, but any help is appreciated! Thanks!
Tags (2)
0 Kudos
1 Reply
V_StuartFoote
MVP Frequent Contributor
Jacob,

Looking at the FillSinks() syntax below, I'd try a "0" or "1" for the use_issinkfield.  As noted in this thread: http://forums.arcgis.com/threads/15398-FillSinks-not-working-properly-in-Python-or-command-line?high...

    FillSinks(in_dem_raster=None, out_hydrodem_raster=None, fill_threshold=None, in_deranged_poly_features=None, use_issinkfield=None)
        FillSinks_archydro(in_dem_raster, out_hydrodem_raster, {fill_threshold}, {in_deranged_poly_features}, {use_issinkfield})
       
        INPUTS:
         in_dem_raster (Raster Layer):
             Input DEM
         fill_threshold {Double}:
             Fill Threshold
         in_deranged_poly_features {Feature Layer}:
             Input Deranged Polygon
         use_issinkfield {Boolean}:
             Use IsSink field
       
        OUTPUTS:
         out_hydrodem_raster (Raster Layer):
             Output Hydro DEM


Stuart
0 Kudos