Select to view content in your preferred language

What is ERROR 999998?

5979
6
06-04-2015 07:01 AM
CarlaInclan
Deactivated User

I am using a Python script to do geocoding of several files. Some times it fails at the second call to the   arcpy.GeocodeAddresses_geocoding  function

Here is the function call. I define the local variables used as actual parameter values earlier in the program

arcpy.GeocodeAddresses_geocoding(in_table=infile_step1,

                                 address_locator=myaddr_locator,

                                 in_address_fields=address_fields,

                                 out_feature_class=outfile_step1,

                                 out_relationship_type="STATIC")

It works for the first file, and when I redefine infile_step1 and outfile_step1 and call it again, I get the following error:

File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geocoding.py", line 212, in GeocodeAddresses

    raise e

ExecuteError: ERROR 999998: Unexpected Error.

Failed to execute (GeocodeAddresses).

What is in line 212 of the geocoding.py file?

Thanks

Carla

Tags (1)
0 Kudos
6 Replies
SepheFox
Deactivated User

Try unchecking background processing in Geoprocessing > Geoprocessing Options.

0 Kudos
CarlaInclan
Deactivated User

How would I do that from Python's IDLE? I do not even open ArcMap, I am just running from IDLE.

Thanks

Carla

SepheFox
Deactivated User

Good to know.

0 Kudos
DarrenWiens2
MVP Alum

Try posting the simplest, complete version of a non-working script that returns this error, otherwise there's not much we can do to help.

Also, you mention that sometimes it fails on the second call - does it sometimes work to completion?

BlakeTerhune
MVP Regular Contributor

Try manually geocoding the table your script fails on using ArcCatalog's built-in tools. That might give you more insight as to what is causing the geocoding process to fail. If it works sometimes, but not others, it's probably an issue with the table (or the data) you're trying to geocode.

0 Kudos
JamesWingate
New Contributor

I had this error while trying to merge 12 polygon shapefiles into one (total feature count ~1M). Tried shorter path names, geoprocessing in foreground instead of background, repair geometry on each file, etc. No luck. Kept getting error 999998 or 999999, unspecified Windows errors. This was using ArcGIS basic 10.5.1 on a Lenovo 64-bit laptop running Windows 10 Pro v1703. Took a chance today and installed 10.6 Desktop pre-release. Just tried the merge and it worked! Yay! I very rarely post to forums as I am a GIS novice, but since I spent hours trying to solve this problem I thought I'd comment and hopefully help someone else.