Changes between Initial Version and Version 1 of Ticket #6930
- Timestamp:
- Mar 4, 2008, 5:10:53 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6930 – Description
initial v1 1 1 trac seems to be able to handle accented characters in state names or transition names. The showworkflow script, however, fails with the following exception when run on a .ini file that trac can handle: 2 2 3 {{{ 3 4 Traceback (most recent call last): 4 5 File "./workflow_parser.py", line 109, in ? … … 8 9 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 189: ordinal not in range(128) 9 10 Failed to parse "inventory-workflow.ini", exiting. 11 }}} 10 12 11 13 The bug is actually in workflow_parser.py (and python's handling of sys.stdout): showworkflow runs workflow_parser.py and redirects the output. Because sys.stdout is redirected, its encoding is set to None, which means that ascii encoding is used. This can't handle most accented characters, result in the exception.