Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not sure why I'm running into this problem. I thought it might have something to do with the merged file being locked or open, but I don't see a "LOCK" file being created in Windows Explorer.

I'm simply trying to Merge a bunch of files and then Dissolve the merged file. Here's my script:

workspaces = arcpy.ListWorkspaces("*", "Folder")
for workspace in workspaces:

    arcpy.env.workspace = workspace
    shps = arcpy.ListFeatureClasses("*", "ALL")

    ## Process: Merge Layers
    descWorkspace = arcpy.Describe(workspace)
    workspaceName = descWorkspace.baseName

    mergeOutput = workspaceName+"_merge"
    arcpy.Merge_management(shps, mergeOutput)

    ## Process: Dissolving Features              <--HERE IS WHERE I'M HAVING PROBLEMS
    disInput = mergeOutput
    disOutput = mergeOutput+"_dis"
    arcpy.Dissolve_management(disInput, disOutput)

This is the error that I'm getting after the merge runs successfully: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset Bus04_merge does not exist or is not supported

I'm obviously missing a step here... (or using incorrect parameters, but I can't figure out in what way)

share|improve this question
What happens when you print shps? Is the list of shapefiles in "workspace" displayed? – Aaron Jan 5 '13 at 19:24
up vote 2 down vote accepted

Try changing the following line in your code:

mergeOutput = workspaceName+"_merge"


mergeOutput = workspaceName+"_merge.shp"



share|improve this answer
I ended up rewriting much of the code, so I can't try that out exactly, BUT, I think ultimately I did realize that changing that to .shp DID help, so great suggestion. Thank you!! – Kristen G. Jan 5 '13 at 22:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.