Skip to content
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

Cannot build documentation with Sphinx 3.2.0 #2568

Closed
st-pasha opened this issue Aug 14, 2020 · 1 comment · Fixed by #2569
Closed

Cannot build documentation with Sphinx 3.2.0 #2568

st-pasha opened this issue Aug 14, 2020 · 1 comment · Fixed by #2569
Assignees
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label documentation

Comments

@st-pasha
Copy link
Contributor

The following error is thrown:

Running Sphinx v3.2.0
loading translations [en]... done
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [readthedocs]: targets for 74 source files that are out of date
updating environment: [new config] 74 added, 0 changed, 0 removed
reading sources... [  1%] api/dt/by
reading sources... [  2%] api/dt/cbind
reading sources... [  4%] api/dt/cut
reading sources... [  5%] api/dt/fread
reading sources... [  6%] api/dt/ifelse
reading sources... [  8%] api/dt/iread
reading sources... [  9%] api/dt/rbind
reading sources... [ 10%] api/dt/repeat
reading sources... [ 12%] api/dt/shift
reading sources... [ 13%] api/dt/sort
reading sources... [ 14%] api/dt/update
reading sources... [ 16%] api/frame

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/events.py", line 110, in emit
    results.append(listener.handler(self.app, *args))
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/__init__.py", line 379, in _process_docstring
    obj, options)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 1074, in __init__
    super().__init__(docstring, config, app, what, name, obj, options)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 198, in __init__
    self._parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 577, in _parse
    lines = self._sections[section.lower()](section)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 689, in _parse_parameters_section
    fields = self._consume_fields(multiple=True)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 274, in _consume_fields
    _name, _type, _desc = self._consume_field(parse_type, prefer_type)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 1106, in _consume_field
    location=self._get_location(),
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/napoleon/docstring.py", line 1077, in _get_location
    filepath = inspect.getfile(self._obj) if self._obj is not None else None
  File "/home/docs/.pyenv/versions/3.7.3/lib/python3.7/inspect.py", line 666, in getfile
    type(object).__name__))
TypeError: module, class, method, function, traceback, frame, or code object was expected, got method_descriptor

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 348, in build
    self.builder.build_update()
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 299, in build_update
    len(to_build))
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 311, in build
    updated_docnames = set(self.read())
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 418, in read
    self._read_serial(docnames)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 439, in _read_serial
    self.read_doc(docname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 479, in read_doc
    doctree = read_doc(self.app, self.env, self.env.doc2path(docname))
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/io.py", line 223, in read_doc
    pub.publish()
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/core.py", line 218, in publish
    self.settings)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/io.py", line 128, in read
    self.parse()
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/readers/__init__.py", line 77, in parse
    self.parser.parse(self.input, document)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/parsers.py", line 102, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 171, in run
    input_source=document['source'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/statemachine.py", line 242, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/statemachine.py", line 459, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2769, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 327, in section
    self.new_subsection(title, lineno, messages)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
    node=section_node, match_titles=True)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 196, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/statemachine.py", line 242, in run
    context, state, transitions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/statemachine.py", line 459, in check_line
    return method(match, context, next_state)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2342, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2354, in explicit_construct
    return method(self, expmatch)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2097, in directive
    directive_class, match, type_name, option_presets)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/docutils/parsers/rst/states.py", line 2146, in run_directive
    result = directive_instance.run()
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/directive.py", line 146, in run
    documenter.generate(more_content=self.content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 1570, in generate
    all_members=all_members)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 894, in generate
    self.document_members(all_members)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 1559, in document_members
    super().document_members(all_members)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 777, in document_members
    check_module=members_check_module and not isattr)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 891, in generate
    self.add_content(more_content)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 567, in add_content
    for i, line in enumerate(self.process_doc(docstrings)):
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 534, in process_doc
    self.options, docstringlines)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 450, in emit
    return self.events.emit(event, *args, allowed_exceptions=allowed_exceptions)
  File "/home/docs/checkouts/readthedocs.org/user_builds/datatable/envs/latest/lib/python3.7/site-packages/sphinx/events.py", line 118, in emit
    (listener.handler, name), exc) from exc
sphinx.errors.ExtensionError: Handler <function _process_docstring at 0x7fa5f994dc80> for event 'autodoc-process-docstring' threw an exception (exception: module, class, method, function, traceback, frame, or code object was expected, got method_descriptor)

Extension error:
Handler <function _process_docstring at 0x7fa5f994dc80> for event 'autodoc-process-docstring' threw an exception (exception: module, class, method, function, traceback, frame, or code object was expected, got method_descriptor)
@st-pasha st-pasha added bug Any bugs / errors in datatable; however for severe bugs use [segfault] label documentation labels Aug 14, 2020
@st-pasha st-pasha added this to the Release 0.11.0 milestone Aug 14, 2020
@st-pasha st-pasha added this to To do in Sprint Jul 27 - Aug 16 via automation Aug 14, 2020
@st-pasha st-pasha self-assigned this Aug 14, 2020
@st-pasha
Copy link
Contributor Author

This appears to be caused by Sphinx issue sphinx-doc/sphinx#8074.

Sprint Jul 27 - Aug 16 automation moved this from To do to Done Aug 14, 2020
st-pasha added a commit that referenced this issue Aug 14, 2020
- Due to a bug in Sphinx, version 3.2.0 cannot be used to build our documentation, so we exclude it in the requirements file;
- Added missing file `qcut.rst`.

Closes #2568
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label documentation
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant