Skip to content

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 #3923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fsimkovic opened this issue Apr 7, 2018 · 4 comments
Closed

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 #3923

fsimkovic opened this issue Apr 7, 2018 · 4 comments
Labels
Support Support question

Comments

@fsimkovic
Copy link

fsimkovic commented Apr 7, 2018

Details

Expected Result

The documentation to build successfully.

Actual Result

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 306, in main
    app.build(opts.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/application.py", line 339, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 328, in build_update
    'out of date' % len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 341, in build
    updated_docnames = set(self.env.update(self.config, self.srcdir, self.doctreedir))
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 584, in update
    self._read_serial(docnames, self.app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 603, in _read_serial
    self.read_doc(docname, app)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/environment/__init__.py", line 724, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/io.py", line 74, in read
    self.parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 185, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 170, in run
    input_source=document['source'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2745, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 326, in section
    self.new_subsection(title, lineno, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 394, in new_subsection
    node=section_node, match_titles=True)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2318, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2330, in explicit_construct
    return method(self, expmatch)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2073, in directive
    directive_class, match, type_name, option_presets)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2122, in run_directive
    result = directive_instance.run()
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1827, in run
    documenter.generate(more_content=self.content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1127, in generate
    self.document_members(all_members)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1048, in document_members
    check_module=members_check_module and not isattr)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1124, in generate
    self.add_content(more_content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1518, in add_content
    ModuleLevelDocumenter.add_content(self, more_content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 845, in add_content
    for i, line in enumerate(self.process_doc(docstrings)):
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 805, in process_doc
    self.options, docstringlines)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/application.py", line 489, in emit
    return self.events.emit(event, self, *args)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/sphinx/events.py", line 79, in emit
    results.append(callback(*args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/numpydoc/numpydoc.py", line 132, in mangle_docstrings
    doc = unicode(doc)
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/numpydoc/docscrape_sphinx.py", line 372, in __str__
    ns = dict((k, '\n'.join(v)) for k, v in ns.items())
  File "/home/docs/checkouts/readthedocs.org/user_builds/conkit/envs/latest/local/lib/python2.7/site-packages/numpydoc/docscrape_sphinx.py", line 372, in <genexpr>
    ns = dict((k, '\n'.join(v)) for k, v in ns.items())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 74: ordinal not in range(128)

Encoding error:
'ascii' codec can't decode byte 0xc3 in position 74: ordinal not in range(128)
The full traceback has been saved in /tmp/sphinx-err-MtO12e.log, if you want to report the issue to the developers.
@fsimkovic fsimkovic changed the title UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 74: ordinal not in range(128) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 Apr 7, 2018
@humitos humitos added the Support Support question label Apr 7, 2018
@humitos
Copy link
Member

humitos commented Apr 7, 2018

This doesn't see to be a problem with RTD code, but with numpydoc. Are you able to build the documentation locally? (outside RTD)

@fsimkovic
Copy link
Author

fsimkovic commented Apr 7, 2018

Local builds work fine using the default make html command.

Using the following Miniconda Python version:

Python 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 17:05:42) 

and' sphinx and numpydoc versions:

numpydoc==0.7.0
Sphinx==1.6.2

@fsimkovic
Copy link
Author

Just to confirm, running with numpydoc==0.8.0 the error is reproducible locally.

@humitos
Copy link
Member

humitos commented Apr 7, 2018

Yeap. You are using 0.8.0 in RTD. That's the problem.

You will need to pin it to 0.7.0.

I'm closing the issue. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants