Issue #1268 resolved

test_setup_command.test_build_sphinx_with_nonascii_path() fails with Python 2

Arfrever Frehtes Taifersar Arahesis
created an issue

test_setup_command.test_build_sphinx_with_nonascii_path() fails with Python 2 (at least 2.6 and 2.7). This test passes with Python 3. I use Sphinx 1.2b3. (This test does not exist in Sphinx 1.1.3.)

FAIL: test_setup_command.test_build_sphinx_with_multibyte_path
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/", line 197, in runTest
  File "/tmp/sphinx/tests/", line 45, in deco
    func(pkgrootdir, proc, *args, **kwds)
  File "/tmp/sphinx/tests/", line 82, in test_build_sphinx_with_multibyte_path
    assert proc.returncode == 0
-------------------- >> begin captured stdout << ---------------------
running build_sphinx
creating build
creating build/sphinx
creating build/sphinx/doctrees
creating build/sphinx/html
Running Sphinx v1.2b1
loading pickled environment... not yet created
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] contents
reading sources... [100%] \u65e5\u672c\u8a9e/\u65e5\u672c\u8a9e

Traceback (most recent call last):
  File "", line 8, in <module>
  File "/usr/lib64/python2.7/distutils/", line 152, in setup
  File "/usr/lib64/python2.7/distutils/", line 953, in run_commands
  File "/usr/lib64/python2.7/distutils/", line 972, in run_command
  File "/usr/lib64/python2.7/site-packages/sphinx/", line 143, in run
  File "/usr/lib64/python2.7/site-packages/sphinx/", line 211, in build
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/", line 211, in build_update
    'out of date' % len(to_build))
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/", line 231, in build
    purple, length):
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/", line 131, in status_iterator
    for item in iterable:
  File "/usr/lib64/python2.7/site-packages/sphinx/", line 469, in update_generator
    self.read_doc(docname, app=app)
  File "/usr/lib64/python2.7/site-packages/sphinx/", line 614, in read_doc
    pub.set_source(None, src_path.encode(fs_encoding))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 24: ordinal not in range(128)

--------------------- >> end captured stdout << ----------------------


Comments (4)

  1. Log in to comment