I need to update datasource of Picture element of layout element of a mapdocument. but it is showing Unicode decode error.
mxd= arcpy.mapping.MapDocument("CURRENT")
for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
oldname = elm.name
... if elm.name==oldname:
... elm.name=oldname.replace(r"ä","ae")
... print elm.name
after running the code I get following error message:
Runtime error Traceback (most recent call last): File "", line 4, in UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)