Roger,I just tried the following code on a river network I have and it did not produce an error.# Layer name in Map Document
s = "Rivers"
# Describe object and print name string to confirm it worked
desc = arcpy.Describe(s)
print desc.namestring
# Get spatial reference and print name
sr = desc.spatialreference
print sr.name
# Get FeatureClass and check if M aware
fc = desc.featureclass
print fc.hasm
# Set M domain
sr.setmdomain( -1000,1000)
This would suggest that there is something odd with your layer as your code looks sound?Duncan