Weird, this works for me. The input parameters need to be supplied as a list (in square brackets []). Can you add a print statement to show the list? Perhaps you can find the problem there. Here is a script converting coverages to shapefiles and merging at the end. I have a similar merge operation below:
import arcpy, os, sys, traceback
arcpy.env.overwriteOutput = True
# Workspace for interchange files
ws = r'C:\IGIC\Beginner\Unit_1\DATA\EffigyMounds\InterchangeFiles'
arcpy.env.workspace = ws
# Local Variables
out = r'C:\IGIC\Beginner\Unit_1\DATA\EffigyMounds\Fire'
try:
# Creates a folder if it doesn't already exist
if not os.path.exists(out):
os.makedirs(out)
# List all ArcInfo Interchange files (.e00)
for cov in arcpy.ListFiles('*.e00'):
arcpy.ImportFromE00_conversion(cov, ws, cov.split('.')[0])
print 'Converted %s' %cov
# Exclude Interchange files and info folder
for cov in arcpy.ListFiles():
if not '.e00' in cov and cov != 'info':
arcpy.env.workspace = os.path.join(ws,cov)
for fc in arcpy.ListFeatureClasses('*polygon'):
arcpy.FeatureClassToFeatureClass_conversion(fc, out, '%s.shp' %cov)
shp = os.path.join(out, '%s.shp' %cov)
print 'Converted Coverage to %s' %shp
# List shapefiles in folder to create input list for merge
arcpy.env.workspace = out
shplist = arcpy.ListFeatureClasses()
arcpy.Merge_management(shplist, os.path.join(out, 'All_Fires.shp'))
print 'done'
except:
# Get the traceback object
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + \
"\nError Info:\n" + str(sys.exc_info()[1])
msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
arcpy.AddError(pymsg)
arcpy.AddError(msgs)
# Print Python error messages for use in Python / Python Window
print pymsg + "\n"
print msgs