<?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: Runtime Error with arcpy.Union_analysis() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322542#M25138</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at this stage, I would try to move the layers out of temp until you can confirm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2018 23:42:16 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-10-17T23:42:16Z</dc:date>
    <item>
      <title>Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322537#M25133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run a union on a feature class (&lt;SPAN style="background-color: #f6f6f6;"&gt;master_merge_footprints_20181011)&lt;/SPAN&gt; and 2 temporary layers made from selected features (using select by attributes and then create layer from selection) from shapefiles (&lt;SPAN style="background-color: #f6f6f6;"&gt;Prelim_S_Fld_Haz_Ar_13245&lt;/SPAN&gt;&amp;nbsp;and&amp;nbsp;&amp;nbsp;&lt;SPAN style="background-color: #f6f6f6;"&gt;S_Fld_Haz_Ar)&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Here's the code snippet from the result (which worked):&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;arcpy.Union_analysis(in_features="Prelim_S_FLD_HAZ_AR_0637 #;Prelim_S_Fld_Haz_Ar_13245 #;'S_Fld_Haz_Ar selection' #;master_merge_footprints_20181011 #", out_feature_class="C:/Users/jbridwell/Documents/ArcGIS/Default.gdb/New_FLD_HAZ_AR_Union", join_attributes="ALL", cluster_tolerance="", gaps="NO_GAPS")&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, when I try&amp;nbsp;a similar process in my script, I keep getting&amp;nbsp;RuntimeError: Object: Error in executing tool. I though there might be a lock or something network related (the files are from a folder connection in a network drive) on one of the files, so I restarted my whole computer, but that was not the issue. Here is the traceback and the relevant portion of the code. Does anyone have any ideas as to what the problem might be or how to get it to run? Note: both&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback:&amp;nbsp;&lt;/P&gt;&lt;P&gt;In [29] wkflw2_union = arcpy.Union_analysis(["master_merge_20181011", nfhl_fld_haz_features], "wkflw2_union_output", "ALL")&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;File "&amp;lt;ipython-input-28-37797fd2b95a&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt; wkflw2_union = arcpy.Union_analysis(["master_merge_20181011", nfhl_fld_haz_features], "wkflw2_union_output", "ALL")&lt;/P&gt;&lt;P&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 734, in Union&lt;BR /&gt; raise e&lt;/P&gt;&lt;P&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\analysis.py", line 731, in Union&lt;BR /&gt; retval = convertArcObjectToPythonObject(gp.Union_analysis(*gp_fixargs((in_features, out_feature_class, join_attributes, cluster_tolerance, gaps), True)))&lt;/P&gt;&lt;P&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 496, in &amp;lt;lambda&amp;gt;&lt;BR /&gt; return lambda *args: val(*gp_fixargs(args, True))&lt;/P&gt;&lt;P&gt;RuntimeError: Object: Error in executing tool&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;wkflw2_union_output&lt;/SPAN&gt; = "C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App/gdb/selects.gdb/wkflw2_union_{}".format(today)
master_merge = "C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App\gdb\selects.gdb\master_merge_footprints_{}".format(today)
wkflw2_union = arcpy.Union_analysis([master_merge, nfhl_fld_haz_features, prelim_fld_haz_features], wkflw2_union_output)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:20:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322537#M25133</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2021-12-12T16:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322538#M25134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how are you arriving at "today"&lt;/P&gt;&lt;P&gt;when I use&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;td &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

td2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;today&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

td
datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2018&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;17&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;16&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;22&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;13&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;855834&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

td2
datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2018&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;17&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;16&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;22&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;18&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;956293&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the time portion and I see that you don't... ie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App/gdb/selects.gdb/wkflw2_union_2018-10-17 16:17:59.888924'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or is your 'today' different&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322538#M25134</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T15:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322539#M25135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, sorry. I didn't include that because it didn't seem relevant but it's at the top under my `import` statements:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;today = datetime.datetime.today().strftime('%Y%m%d')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;which returns a tring:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Out[1] '20181017'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 21:12:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322539#M25135</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-10-17T21:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322540#M25136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;You use forward slashes for the main part of you paths&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"C:/Workspace/Sandbox/MapChangeProject/master_Map_Change_Report_App&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;but then switchup for the trailing bits, have you confirmed that that isn't confusing things&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;/gdb/selects.gdb/wkflw2_union_&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: monospace; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;\gdb\selects.gdb\master_merge_footprints_{}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 21:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322540#M25136</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-17T21:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322541#M25137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope.&amp;nbsp;Same results. Could this be related to the geometry of the temp layers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 22:45:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322541#M25137</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2018-10-17T22:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Runtime Error with arcpy.Union_analysis()</title>
      <link>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322542#M25138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at this stage, I would try to move the layers out of temp until you can confirm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 23:42:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/runtime-error-with-arcpy-union-analysis/m-p/322542#M25138</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-10-17T23:42:16Z</dc:date>
    </item>
  </channel>
</rss>

