jeudi 29 janvier 2015

Error message trying to Merge shapefiles in Python


I am quite new to Python - but this task should be not to complicated, but...


I try to merge all shapefiles from one File together into on, using this:



shapeList = arcpy.ListFeatureClasses()
print shapeList
for fc in shapeList:
if fc == "*domain*":
arcpy.Merge_management(shapeList, "MergeList")


But I always get this error message


Traceback (most recent call last): File "", line 1, in File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 3987, in Merge raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Datasets: -- HERE THE LIST OF FEATURECLASSES -- does not exist or is not supported Failed to execute (Merge).


I am sure there are only feature classes in the folder, when I try to use a Merge function I get the Error: ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed. Failed to execute (Append). Failed at Thu Jan 29 16:22:28 2015 (Elapsed Time: 0.00 seconds)


I do not understand what is going on. Does anybody know what's going wrong?


Thanks a lot... I am getting crazy!


Frauke





Aucun commentaire:

Enregistrer un commentaire