I don't know if this will fix your problem, but I was having a similar issue (except with vector location instead of raster location) with ThinCrossSection tool even though I set the arcpy enviroment and ArcHydro's target locations. The issue seems to be that you need a full path to a feature instead of just the name: # This did not work for me
ArcHydroTools.ThinCrossSection("TEMP", "MaxNumberOfVertices", 500, output, report)
# This did
output = gdb_path + '\\' + output
report = gdb_path + '\\' + report
ArcHydroTools.ThinCrossSection("TEMP", "MaxNumberOfVertices", 500, output, report) And with this, I just had to set the arcpy workspace - I don't need to call SetTargetLocations from ArcHydro. So specifically for yours, replacing 'fil' in the FillSinks call with the full path to 'fil' might work
... View more