from mako import exceptions try: raise ValueError(u'\N{VULGAR FRACTION ONE HALF}') except: text = exceptions.html_error_template().render_unicode()