Select to view content in your preferred language

Why does Background Processing fail?

5073
8
Jump to solution
07-15-2015 08:11 AM
ShaneBuscher
Regular Contributor

I developed a Python module that is using arcpy to perform some geoprocessing.  I can successfully run the geoprocessing routines outside of ArcMap. This is accomplished by opening up a Python interpreter in command shell, importing the module, and executing a function that kicks off the GP.

For ArcMap I created a Python Toolbox that that imports the module I developed and has a tool that kicks off the same GP routines.  However, the same code fails with the infamously non-descriptive exception of 'Your background geoprocessing operations did not complete sucessfully due to an error'. With some logging, I was able to pinpoint the process specifically failing on the Dice tool.

My first guess was I didn't have an Advanced Desktop license checked out from the license server.  At first I couldn't even run the tool (ArcMap denies it) until I switched from Standard to Advanced. That ruled out a licensing issue.  So I tried running the the Dice directly from the System Toolbox using the exact same parameters.  It worked.

In summary, my package executes fine when running outside of ArcMap, but fails when it is run as a Tool. It can't be a license issue because I have the required license. The System Toolbox Dice tool also works. Now I'm left with an extremely generic exception message from ArcMap with nowhere to go. Any ideas?

ArcMap 10.1

64 bit Background Geoprocessing installed

Regards,

Shane

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ShaneBuscher
Regular Contributor

After troubleshooting with tech support this issue was caused by a known bug in 10.1:

it looks like you are running into "NIM086984 The Python Multiprocessing Module returns error 000714 when run from a script tool and if the 64-bit Background Geoprocessing upgrade is installed, but works when run from a 64-bit Python IDE."

It looks like this bug is specific to 10.1 SP1 with the background geoprocessing installed. The workarounds are:

1) Run the script from the python window

2) Run the script from the command line

3) Unistall Background Geoprocessing

4) Upgrade to 10.2 or 10.3

View solution in original post

8 Replies
FreddieGibson
Honored Contributor

What happens when you execute the tool in the background from the UI for the tool in ArcMap? And are you using 32bit or 64bit background gp?

0 Kudos
ShaneBuscher
Regular Contributor

Below are the results I've had under all scenarios. I have the 64-bit GP Background Processing installed so ArcMap should be using 64-bit Python, although it may use 32-bit when disabling Background GP (I've seen conflicting documentation on this).

Running package outside of ArcMap

64-bit Python: success

Running Custom tool in ArcMap

Background GP enabled: error

Background GP disable: error

Running System Toolbox --> Dice tool in ArcMap

Background GP enabled: success

Background GP disabled: success

0 Kudos
FreddieGibson
Honored Contributor

Can you send your syntax for the Dice tool with the parameter values hard-coded?

0 Kudos
ShaneBuscher
Regular Contributor

dice_result = arcpy.Dice_management("PolylineInput", "DiceOutput", 1000)

0 Kudos
ShaneBuscher
Regular Contributor

If this helps here's the relevant code I'm executing:

    # Convert buffer polygon features to lines

    arcpy.AddMessage("Converting polygon to polyline.")

    line_result = arcpy.PolygonToLine_management(buffer_result,

            _scratch_workspace + "\BUFFER_TO_LINE")

    # Dice

    arcpy.AddMessage("Dicing.")

    dice_result = arcpy.Dice_management(line_result,

            _scratch_workspace + "\BUFFER_DICE", kwargs["dice_vertex_limit"])

0 Kudos
FreddieGibson
Honored Contributor

What is your scratch workspace set to? (Folder, File GDB, Personal GDB, Enterprise GDB)

0 Kudos
ShaneBuscher
Regular Contributor

It's set to a file GDB existing locally (C:\ArcGIS\scratch.gdb).

0 Kudos
ShaneBuscher
Regular Contributor

After troubleshooting with tech support this issue was caused by a known bug in 10.1:

it looks like you are running into "NIM086984 The Python Multiprocessing Module returns error 000714 when run from a script tool and if the 64-bit Background Geoprocessing upgrade is installed, but works when run from a 64-bit Python IDE."

It looks like this bug is specific to 10.1 SP1 with the background geoprocessing installed. The workarounds are:

1) Run the script from the python window

2) Run the script from the command line

3) Unistall Background Geoprocessing

4) Upgrade to 10.2 or 10.3