Issues

Issue #298 wontfix

ext.autodoc fails on non-ascii python files

Anonymous 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 self.builder.build_update() 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 (5)

  1. Log in to comment