Error running build walls in Python

958
2
12-15-2016 04:26 PM
Labels (1)
JoannaMerson1
New Contributor II

I am trying to run the terrain preprocessing arcHydro tools from a standalone python script. However, upon running ArcHydroTools.BuildWalls(), I get the error:

System.InvalidCastException: Conversion from string "" to type 'Double' is not valid. ---> System.FormatException: Input string was not in a correct format.

   at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)

   --- End of inner exception stack trace ---

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)

   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value)

   at ESRI.APWR.ApHydro.ArcHydroOp.BuildWalls(ApLayers apLayers, Double innerWallHeight, Double wallBuffer, Double breachLineBuffer, ITrackCancel& trackcancel, IGPMessages& messages, String& exMessage) in C:\Builds\HydroSolutions\10.3_ArcHydro\Sources\ArcHydroTools\src\ApHydro\ArcHydroOp.vb:line 13815
Failed to execute (BuildWalls).

I have used ArcHydroTools.SetTargetLocations to set a local folder and GDB.

The previous tool in my python script, ArcHydroTools.DEMReconditioning, runs just fine.

The output of ArcHydroTools.BuildWalls() is in a folder. I have tried clearing my temp folder.

I have arcpy.env.mask set to the same layer as the outer walls.

I am using python 2.7.8, arcpy is from arcMap 10.3.1, and Arc Hydro for ArcGIS 10.2 (version 10.2, March 30 2015)

Any suggestions would be appreciated.

0 Kudos
2 Replies
ThaineHerman_Assumpção
New Contributor

I had the same problem (outside python, but same error). I have tried almost everything suggested through the forum (cleaning temp, check process extent, check if same spatial reference, short and root folders and file names, copying feature to another shapefile). Nothing worked. But I didn't try shapefiles generated differently from the one I have. 

My workaround was to transform the outer wall polygon into lines and use it as inner walls.

DanielaManuschevich
New Contributor

Useless waste of time. Do it in the open source sotfware named QSIG. 

0 Kudos