Select to view content in your preferred language

error generating watersheds

2052
7
09-22-2017 02:51 PM
CarlosRibeiro
Occasional Contributor

Dear folks,

it took me some time to figure out a very anoying error when generating watersheds in ArcGIS 10.5.1.

If the field type of the pour point data is double, and if there is no other integer field in the attribute table, the watershed command will not run and the following error message is displayed:

ERROR 999998: Unexpected Error.
Failed to execute (Watershed).

The same error occurs if you try to convert the point feature class to a raster.

Cheers

Tags (1)
0 Kudos
7 Replies
DanPatterson_Retired
MVP Emeritus

You need to provide the important details Carlos... like the projection of the data, the file paths that you are using, the source of the inputs and the destinations of the outputs.  A general error like that suggests that it is something with the environments and their settings.

0 Kudos
CarlosRibeiro
Occasional Contributor

Dear Dan Patterson,

I double checked all files paths, have projected both the raster and the feature class to WGS84_UTM24S and got the same error message.

Finally,  I realized what is causing the error:

If the field type of the pour point data used to differentiate watersheds is long integer, and if there is no other short integer field in the attribute table, the watershed command simply will not run at all!:

DanPatterson_Retired
MVP Emeritus

Bizarre reason for a failure.  Why would the tool differentiate between long and short integer.  Nice catch

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Try disabling Background Processing in Geoprocessing Options (Uncheck "Enable Background Processing"). Foreground and background processing—Help | ArcGIS Desktop 

Do you still get the error?



Think Location
0 Kudos
DanPatterson_Retired
MVP Emeritus

Or just check to see if the tool is capable of using background geoprocessing 

You can check the General tab of the tool properties for the Always run in foreground check box to see if a tool is capable of running in the background.

0 Kudos
CarlosRibeiro
Occasional Contributor

Yes, Jayanta. In fact, this was the first thing I tried. Still got the same error message!

0 Kudos
CarlosRibeiro
Occasional Contributor

This was the first thing I tried. Still got the same error message!

0 Kudos