<?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 Failed to execute Merge in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755910#M58312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote next script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
import glob

arcpy.env.workspace = "C:\\code\\polygons\\"

files = glob.glob("C:\\code\\polygons\\*.shp")
outlocation = "C:\\code\\single\\"
emptyshp = "1.shp"

arcpy.Merge_management(files, "C:\\code\\single\\1.shp")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I trying to run it I get error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;C:\code&amp;gt;join_polygons.py
Traceback (most recent call last):
&amp;nbsp; File "C:\code\join_polygons.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Merge_management(files, "C:\\code\\single\\1.shp")
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 378
8, in Merge raise e
arcgisscripting.ExecuteError: ERROR 001156: Failed on input OID 0, could not write value '"BKA_03595_03586_46_3NP2_17_T_PSS1_170915_290313.img"' to output field cDataFileNFailed to execute (Merge).&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And at output I folder I got 1.shp file with few merged futures. But file looked like corrupted.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Jun 2013 09:34:36 GMT</pubDate>
    <dc:creator>DmitryBubnenkov</dc:creator>
    <dc:date>2013-06-26T09:34:36Z</dc:date>
    <item>
      <title>Failed to execute Merge</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755910#M58312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote next script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
import glob

arcpy.env.workspace = "C:\\code\\polygons\\"

files = glob.glob("C:\\code\\polygons\\*.shp")
outlocation = "C:\\code\\single\\"
emptyshp = "1.shp"

arcpy.Merge_management(files, "C:\\code\\single\\1.shp")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I trying to run it I get error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;C:\code&amp;gt;join_polygons.py
Traceback (most recent call last):
&amp;nbsp; File "C:\code\join_polygons.py", line 14, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Merge_management(files, "C:\\code\\single\\1.shp")
&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 378
8, in Merge raise e
arcgisscripting.ExecuteError: ERROR 001156: Failed on input OID 0, could not write value '"BKA_03595_03586_46_3NP2_17_T_PSS1_170915_290313.img"' to output field cDataFileNFailed to execute (Merge).&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And at output I folder I got 1.shp file with few merged futures. But file looked like corrupted.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 09:34:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755910#M58312</guid>
      <dc:creator>DmitryBubnenkov</dc:creator>
      <dc:date>2013-06-26T09:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute Merge</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755911#M58313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sounds like a field mapping issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try running the same merge in the interactive tool.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 10:44:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755911#M58313</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-06-26T10:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Failed to execute Merge</title>
      <link>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755912#M58314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;sounds like the field "cDataFileNFailed" is either not a text field, or is not large enough to hold that string.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jun 2013 18:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/failed-to-execute-merge/m-p/755912#M58314</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-06-26T18:35:38Z</dc:date>
    </item>
  </channel>
</rss>

