<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why does Background Processing fail? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632983#M49320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2015 15:21:07 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2015-07-15T15:21:07Z</dc:date>
    <item>
      <title>Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632982#M49319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I developed a Python module that is using arcpy to perform some geoprocessing.&amp;nbsp; 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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; 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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first guess was I didn't have an Advanced Desktop license checked out from the license server.&amp;nbsp; 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.&amp;nbsp; So I tried running the the Dice directly from the System Toolbox using the exact same parameters.&amp;nbsp; It worked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcMap 10.1&lt;/P&gt;&lt;P&gt;64 bit Background Geoprocessing installed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shane&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 15:11:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632982#M49319</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-07-15T15:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632983#M49320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 15:21:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632983#M49320</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-07-15T15:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632984#M49321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Running package outside of ArcMap&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;64-bit Python: success&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Running Custom tool in ArcMap&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Background GP enabled: error&lt;/P&gt;&lt;P&gt;Background GP disable: error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Running System Toolbox --&amp;gt; Dice tool in ArcMap&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Background GP enabled: success&lt;/P&gt;&lt;P&gt;Background GP disabled: success&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 15:59:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632984#M49321</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-07-15T15:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632985#M49322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you send your syntax for the Dice tool with the parameter values hard-coded?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632985#M49322</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-07-15T16:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632986#M49323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dice_result = arcpy.Dice_management("PolylineInput", "DiceOutput", 1000) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:10:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632986#M49323</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-07-15T16:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632987#M49324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this helps here's the relevant code I'm executing: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Convert buffer polygon features to lines&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Converting polygon to polyline.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; line_result = arcpy.PolygonToLine_management(buffer_result, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _scratch_workspace + "\BUFFER_TO_LINE") &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Dice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Dicing.")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dice_result = arcpy.Dice_management(line_result, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _scratch_workspace + "\BUFFER_DICE", kwargs["dice_vertex_limit"]) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632987#M49324</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-07-15T16:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632988#M49325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is your scratch workspace set to? (Folder, File GDB, Personal GDB, Enterprise GDB)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 18:00:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632988#M49325</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-07-15T18:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632989#M49326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's set to a file GDB existing locally (C:\ArcGIS\scratch.gdb).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 18:03:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632989#M49326</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-07-15T18:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does Background Processing fail?</title>
      <link>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632990#M49327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After troubleshooting with tech support this issue was caused by a known bug in 10.1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;it looks like you are running into "&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;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."&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;It looks like this bug is specific to 10.1 SP1 with the background geoprocessing installed. The workarounds are:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;1) Run the script from the python window&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;2) Run the script from the command line&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;3) Unistall Background Geoprocessing&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 10.0pt; font-family: 'Trebuchet MS','sans-serif';"&gt;4) Upgrade to 10.2 or 10.3&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2015 20:42:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-does-background-processing-fail/m-p/632990#M49327</guid>
      <dc:creator>ShaneBuscher</dc:creator>
      <dc:date>2015-08-13T20:42:02Z</dc:date>
    </item>
  </channel>
</rss>

