ERROR 999998: Unexpected Error.

267 views
Skip to first unread message

thak

unread,
Sep 22, 2010, 5:30:54 PM9/22/10
to Python - ARCGIS geoprocessing
I get this ambiguous error message from my python script when it's
trying to execute an eliminate on a fgdb feature class. I tried the
script on my desktop and on two of the GTS servers with the same
results.

When I google the error message, I get a few results that all point to
the os.

Below is the piece of code causing the error.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Make a layer from the feature class...
gp.MakeFeatureLayer(wksp2+"\\R4SlrdAllTemp2","tmp_lyr4")

# Select the 1/4 hectare slivers...
gp.SelectLayerByAttribute("tmp_lyr4", "NEW_SELECTION", "Shape_Area <
20000")

# toast the slivers
gp.Eliminate_management("tmp_lyr4", wksp2+"\\R4SlrdAllTemp3",
"LENGTH")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And this is the error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "F:/projects_2010/script_test/slrd_all_test4.py", line 132, in
<module>
gp.Eliminate_management("tmp_lyr4", wksp2+"\\R4SlrdAllTemp3",
"LENGTH")
ExecuteError: ERROR 999998: Unexpected Error.
Failed to execute (Eliminate).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Does anyone have any ideas on how to get past this one?

thak

unread,
Sep 22, 2010, 7:34:03 PM9/22/10
to Python - ARCGIS geoprocessing
Ok. Looks like I solved my own problem. As I looked at the code, I
realized that my selection was grabbing 2 hectare polygons instead of
1/4 hectare ones. In my dataset, it was the difference between
grabbing 75% of the polygons vs. 13% of the polygons.

So, as I monitored the script before it crashed, I noticed that it was
soaking up most all of the system resources. Hence the unexpected
system error.

As soon as I changed the threshold to 1/4 ha, everything was happy.

humbled....
Reply all
Reply to author
Forward
0 new messages