test_setup_command.test_build_sphinx_with_nonascii_path() fails with Python 2

Arfrever Frehtes Taifersar Arahesis avatarArfrever 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/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/tmp/sphinx/tests/test_setup_command.py", line 45, in deco
    func(pkgrootdir, proc, *args, **kwds)
  File "/tmp/sphinx/tests/test_setup_command.py", line 82, in test_build_sphinx_with_multibyte_path
    assert proc.returncode == 0
AssertionError: 
-------------------- >> 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 "setup.py", line 8, in <module>
    cmdclass=cmdclass,
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/python2.7/site-packages/sphinx/setup_command.py", line 143, in run
    app.build(force_all=self.all_files)
  File "/usr/lib64/python2.7/site-packages/sphinx/application.py", line 211, in build
    self.builder.build_update()
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/__init__.py", line 211, in build_update
    'out of date' % len(to_build))
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/__init__.py", line 231, in build
    purple, length):
  File "/usr/lib64/python2.7/site-packages/sphinx/builders/__init__.py", line 131, in status_iterator
    for item in iterable:
  File "/usr/lib64/python2.7/site-packages/sphinx/environment.py", line 469, in update_generator
    self.read_doc(docname, app=app)
  File "/usr/lib64/python2.7/site-packages/sphinx/environment.py", 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 (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.