Madeline,
For some reason I can’t respond to the thread.
I don’t get the error when I run the following from a script tool within ArcMap.
import arcpy
precipLayer = arcpy.MakeFeatureLayer_management(r"D:\Active\ArcPY\10x\ScrumWorks\Data\Drive_A\basin_utmcopy.shp")
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
arcpy.mapping.AddLayer(df, precipLayer.getOutput(0), "TOP") #NO ERROR
#arcpy.mapping.AddLayer(df, precipLayer, "TOP") #GOT ERROR BUT EXPECTED
What version of the software are you using?
Have you tried using a layer file that references the shapefile on disk?
Replace:
precipLayer = arcpy.MakeFeatureLayer_management(r"D:\Active\ArcPY\10x\ScrumWorks\Data\Drive_A\basin_utmcopy.shp")
with:
precipLayer = arcpy.mapping.Layer(r"D:\Active\ArcPY\10x\ScrumWorks\Data\Drive_A\basin_utmcopy.shp")
Jeff