Suliman1

Failed to execute Merge

Discussion created by Suliman1 on Jun 26, 2013
Latest reply on Jun 26, 2013 by rzufelt
I wrote next script:

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")


But when I trying to run it I get error:
C:\code>join_polygons.py
Traceback (most recent call last):
  File "C:\code\join_polygons.py", line 14, in <module>
    arcpy.Merge_management(files, "C:\\code\\single\\1.shp")
  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).


And at output I folder I got 1.shp file with few merged futures. But file looked like corrupted.

Outcomes