#192 test_directives/test_include.py: UnicodeEncodeError

closed-fixed
nobody
None
5
2012-05-11
2012-05-11
Jakub Wilk
No

If LC_ALL=C is set to C, test_directives/test_include.py fails with UnicodeEncodeError:

$ LC_ALL=C python test/test_parsers/test_rst/test_directives/test_include.py
................E.............
======================================================================
ERROR: test/test_parsers/test_rst/test_directives/test_include.py: totest['include'][14]; test_parser (DocutilsTestSupport.ParserTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/docutils-0.9/test/DocutilsTestSupport.py", line 456, in test_parser
self.parser.parse(self.input, document)
File "/tmp/docutils-0.9/docutils/parsers/rst/__init__.py", line 162, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/tmp/docutils-0.9/docutils/parsers/rst/states.py", line 174, in run
input_source=document['source'])
File "/tmp/docutils-0.9/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/tmp/docutils-0.9/docutils/statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "/tmp/docutils-0.9/docutils/parsers/rst/states.py", line 2279, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/tmp/docutils-0.9/docutils/parsers/rst/states.py", line 2291, in explicit_construct
return method(self, expmatch)
File "/tmp/docutils-0.9/docutils/parsers/rst/states.py", line 2034, in directive
directive_class, match, type_name, option_presets)
File "/tmp/docutils-0.9/docutils/parsers/rst/states.py", line 2083, in run_directive
result = directive_instance.run()
File "/tmp/docutils-0.9/docutils/parsers/rst/directives/misc.py", line 75, in run
handle_io_errors=None)
File "/tmp/docutils-0.9/docutils/io.py", line 222, in __init__
self.source = open(source_path, mode, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

----------------------------------------------------------------------
Ran 30 tests in 0.396s

FAILED (errors=1)

Discussion

  • Günter Milde

    Günter Milde - 2012-05-11
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks