Following samples in Help and it STILL isn't working!

Discussion created by jazmateta on Jul 27, 2011
Latest reply on Jul 27, 2011 by jazmateta
I am in the process of creating a blended script that will have python scripting and data models (exported to python to be incorporated) that can be double clicked from an icon on the desktop that will do the following:
1.  Open mxd
2.  Remove a specific layer - the last geocoding results
3.  Geocode the newest data from the txt file that opens in the mxd
4.  Have the user review the unmatched data and match as necessary
5.  Update the geocoded results to a preexisting layer file symbology definition
6.  Save the geocoding results as a new feature class in the filegeodatabase
7.  Create maps based on certain predefined queries where date ranges and certain items change
8.  Eventually have the geocoded results appended to a master feature class for archive

I can get the name of the mxd and the layer listing in the mxd using python.  However, when I attempt to either remove the geocoding results layer or update the layer using the resaved layer file, I get
"Runtime error <type 'exceptions.AssertionError'>
I looked that up and it seems to refer to the illegal characters in the name - ":" - changed that and it STILL doesn't work.

import arcpy
arcpy.mapping.UpdateLayer('Layers','Featureclass name','path and layerfile name')
arcpy.mapping.RemoveLayer('Layers','Featureclass name')

I was under the impression that the python window in ArcMap was to be used for testing the scripting.

I'd sure appreciate some help on this cause the script needs to be done within the next week to two weeks :(