sle06

error in setting text

Discussion created by sle06 on Dec 29, 2011
Latest reply on Dec 29, 2011 by sle06
I am trying to generate a map book with the following code that I downloaded but I keep getting an errror: RuntimeError: TextElementObject: Error in setting text

#Read values from input dialog
title = arcpy.GetParameterAsText(0)
organization = arcpy.GetParameterAsText(1)

arcpy.AddMessage("    Updating Title Page ...")
titleMXD = arcpy.mapping.MapDocument("path\county_map_book\MapBook_TitlePage.mxd")
titleText = arcpy.mapping.ListLayoutElements(titleMXD, "TEXT_ELEMENT", "Title")[0]
titleText.text = title
arcpy.mapping.ExportToPDF(titleMXD,"path\county_map_book\Output\1_TitlePage.pdf")
del titleMXD


I know it has to do with titleText.text = title, I'm just not sure how to fix it.

Thanks for your help,
S

Outcomes