Select to view content in your preferred language

ExecuteError in append command

994
3
03-12-2013 10:37 AM
TatyanaDeryugina1
Deactivated User
I'm trying to append several shapefiles together. I adapted an example script from http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0013000000, but it's not working. Moreover, the error code is completely uninformative to me. Here's the script:

# Import system modules
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:\Users\deryugin\Downloads\backup"

# Set local variables
inCovers = ["tr01_d00.shp", "tr02_d00.shp", "tr04_d00.shp", "tr05_d00.shp"]
outCover = "test.shp"
appendMethod = ""
featureClasses = ""
numberMethod = ""

# Execute Append
arcpy.Append_arc(inCovers, outCover, appendMethod, featureClasses, numberMethod)

Here is the error output:

Traceback (most recent call last):
File "C:\Users\deryugin\Dropbox\LR effects of pollution\analysis\data\Census tract shapefiles\append_files.py", line 22, in <module>
arcpy.Append_arc(inCovers, outCover, appendMethod, featureClasses, numberMethod)
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\arc.py", line 1399, in Append
raise e
ExecuteError: ERROR 999999: Error executing function.
Failed to execute (Append).


Any ideas about what I'm doing wrong?
Tags (2)
0 Kudos
3 Replies
LindseyWood
Deactivated User
Not sure if this is the answer but I tried this a while ago and had the same error... when I tried it manually with Catalog it gave me a different error something like 000594: Input feature 1: falls outside of geometry domains... I would try a manual run first to see if you get a different error.
But Since yours are not set I am going to throw that out there and see if that works try:

arcpy.env.XYDomain ="-180 -90 180 90"
arcpy.SpatialReference= spRef = "D:/ArcGIS/Desktop10.0/Coordinate Systems/" +\
                                    "Geographic Coordinate Systems/World/WGS 1984.prj"   (OR WHEREVER YOURS IS SET)

Also maybe try using arcpy.Append_management instead
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000050000000
0 Kudos
TatyanaDeryugina1
Deactivated User
Thank you, the combination of those two suggestions worked. Still not sure what was going wrong, but at least I have my dataset now.
0 Kudos
curtvprice
MVP Alum
Still not sure what was going wrong


Append_arc (Coverage toolbox) and Append_management (Data management toolbox) are different tools.

Append_management is the one that accepts shapefile input.
0 Kudos