ext.autodoc fails on non-ascii python files

Anonymous avatarAnonymous created an issue

I'm using sphinx's sphinx.ext.autodoc and it is failing on a python file with utf-8 characters in it. The file in question is properly tagged with a "# -*- coding: utf-8" line at the top, as per the python documentation. The traceback I get from sphinx (when using pdb) follows.

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/sphinx/cmdline.py", line 172, in main
    app.build(all_files, filenames)
  File "/usr/lib/python2.6/site-packages/sphinx/application.py", line 130, in build
  File "/usr/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 260, in build_update
    self.build(['__all__'], to_build)
  File "/usr/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 285, in build
    purple, length):
  File "/usr/lib/python2.6/site-packages/sphinx/builders/__init__.py", line 131, in status_iterator
    for item in iterable:
  File "/usr/lib/python2.6/site-packages/sphinx/environment.py", line 513, in update_generator
    self.read_doc(docname, app=app)
  File "/usr/lib/python2.6/site-packages/sphinx/environment.py", line 607, in read_doc
    raise SphinxError(str(err))
SphinxError: 'ascii' codec can't decode byte 0xc3 in position 35: ordinal not in range(128)
> /usr/lib/python2.6/site-packages/sphinx/environment.py(607)read_doc()
-> raise SphinxError(str(err))

Using sphinx 0.6.3 on Arch Linux.

Comments (4)

  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.