I'm trying to use ArcHydroTools in ArcMap 10.2.2 and this error always appears in the finish of the process:

File "<stdin>", line 1, in <module>
  File "C:\Program Files (x86)\ESRI\WaterUtils\ArcHydro\bin\ArcHydroTools.py", line 6805, in FillSinks
    raise e
arcgisscripting.ExecuteError: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel)
   at ESRI.APWR.ApHydro.ArcHydroOp.FillSinks(ApLayers& aplayers, Boolean useIsSink, Boolean fillAll, Double fillLimit, ITrackCancel trackCancel, IGPMessages messages, String& exMessage) in C:\Builds\HydroSolutions\10.2_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 64688
Failed to execute (FillSinks).

My code is:

import arcpy 
import ArcHydroTools

from arcpy import env
ws = env.workspace = r"C:/python_results"
input_name = "C:/python_results/project.tif"
output_name = "C:/python_results/Fil"
ArcHydroTools.FillSinks(input_name, output_name)

I tried this options (which I found in another answer here) but nothing changed:

  1. moved all of my data under C:\data\
  2. created new file geodatabase (named testing.gdb) under that folder
  3. increased the max number of unique values to render
  4. set out the targets (C:\data for raster and C:\data\testing.gdb for vector files) using ApUtilites
  5. set out the processing extent to the extent of my DEM (Geoprocessings>Environments>Processing extent ) )
  6. saved my project as testing.mxd under C:\data
  7. set testing.gdb to be default workspace. (this finally solved the last errors I was getting)
  8. also named my data frame simply to "data" since ArcHydro -tools tend to add data frame name to output-file paths. I'm not sure if step this is needed.

I know that this error normally is about the communication between machines, but maybe is about computer memory, I don't know...

  • Given that you are using software which will be retired in a matter of weeks, I'd suggest you start using an ArcGIS release for which Tech Support exists, and upgrading your ArcHydro to the build which functions with that release. Then you can either use working software or be able to get support to find solutions. Posting five questions here on the same topic isn't getting the job done. – Vince Apr 23 '19 at 18:29

Have you tried sending your output, output_name, into a different format? Like .tif or .img instead of GRID? Sometimes that works for me (although I never understand why).

| improve this answer | |
  • Hmmm.. I tried it and another error appeared: "The value is not a Feature Layer." Do you know something about it? I had already this error but never find the really solution for it.. – miriagollmann Apr 23 '19 at 18:36
  • I haven't used arc-hydro in years so I'm not familiar with this command. Based on your script I figured you were giving it a GRID raster for output_name. However, if the error handling is looking for a feature layer you might try using a shapefile (output_name = "C:/python_results/Fil.shp") or save it inside your geodatabase. – IowaStatePython Apr 24 '19 at 19:24
  • Thanks for this idea, but unfortunately it doesn't work too :/ – miriagollmann Apr 24 '19 at 19:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.