id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 11133,TocMacro stopped working with trac 1.0.1,Jens Langner,Ryan J Ollos,"I recently recognized that the TocMacro somehow seem to have stopped working with my installed copy of trac 1.0.1. Here the following error is returned instead when a page is layouted which uses the TOC() macro: {{{ UnicodeEncodeError: 'ascii' codec can't encode character u'\u200b' in position 85: ordinal not in range(128) }}} The trac.log shows the following entries if that happens: {{{ 2013-06-02 13:16:16,974 Trac[formatter] ERROR: Macro TOC(titleindex, heading=FAQ Contents, notitle, depth=2, FAQ/General Questions, FAQ/Installing YAM, FAQ/Using YAM, FAQ/ARexx Scripting, FAQ/Debugging) failed: Traceback (most recent call last): File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 765, in _macro_formatter return macro.ensure_inline(macro.process(args)) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 356, in process text = self.processor(text) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 343, in _macro_processor text) File ""build/bdist.linux-x86_64/egg/tractoc/macro.py"", line 193, in expand_macro params['min_depth'] < 2) File ""build/bdist.linux-x86_64/egg/tractoc/macro.py"", line 215, in _render_title_index fmt.format(page_text, NullOut()) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 1423, in format Formatter.format(self, text) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 1283, in format result = re.sub(self.wikiparser.rules, self.replace, line) File ""/usr/lib64/python2.7/re.py"", line 151, in sub return _compile(pattern, flags).sub(repl, string, count) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 1201, in replace replacement = self.handle_match(fullmatch) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 1197, in handle_match return internal_handler(match, fullmatch) File ""/usr/lib64/python2.7/site-packages/trac/wiki/formatter.py"", line 579, in _shrefbr_formatter self._make_link(ns, target, match, match, fullmatch) File ""/usr/lib64/python2.7/site-packages/genshi/builder.py"", line 107, in __str__ return str(self.generate()) UnicodeEncodeError: 'ascii' codec can't encode character u'\u200b' in position 85: ordinal not in range(128) }}} If you want to have a look at the corresponding page which uses this macro have a look at: https://yam.ch/wiki/FAQ There you should be able to see the error in question.",defect,closed,normal,TocMacro,blocker,cantfix,genshi 0.7,Steffen Hoffmann,1.0