Exception shown when compiling a doc (related to toctree in HTML layout)

Kat Katapult avatarKat Katapult created an issue

Hi, I'm receiving an exception when trying to compile a doc.

"Please also report this if it was a user error, so that a better error message can be provided next time."

Here is the stack:

# Sphinx version: 1.2b1
# Python version: 2.7.4
# Docutils version: 0.10 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\cmdline.py", line 247, in main
    app.build(force_all, filenames)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\application.py", line 211, in build
    self.builder.build_update()
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\__init__.py", line 211, in build_update
    'out of date' % len(to_build))
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\__init__.py", line 267, in build
    self.write(docnames, list(updated_docnames), method)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\__init__.py", line 310, in write
    self._write_serial(sorted(docnames), warnings)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\__init__.py", line 323, in _write_serial
    self.write_doc(docname, doctree)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\html.py", line 438, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\html.py", line 750, in handle_page
    output = self.templates.render(templatename, ctx)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\jinja2glue.py", line 128, in render
    return self.environment.get_template(template).render(context)
  File "C:\Python27\lib\site-packages\jinja2-2.6-py2.7.egg\jinja2\environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\themes\basic\page.html", line 10, in top-level template code
    {%- extends "layout.html" %}
  File "E:\GitHub\CodeIgniter\user_guide_src\source\./_themes\eldocs\layout.html", line 81, in top-level template code
    {%- block content %}
  File "E:\GitHub\CodeIgniter\user_guide_src\source\./_themes\eldocs\layout.html", line 84, in block "content"
    {{ toctree(collapse=true) }}
  File "C:\Python27\lib\site-packages\jinja2-2.6-py2.7.egg\jinja2\sandbox.py", line 349, in call
    return __context.call(__obj, *args, **kwargs)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\html.py", line 742, in <lambda>
    ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, **kw)
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\builders\html.py", line 678, in _get_local_toctree
    docname, self, collapse, **kwds))['fragment']
  File "C:\Python27\lib\site-packages\sphinx-1.2b1-py2.7.egg\sphinx\environment.py", line 1046, in get_toctree_for
    result.extend(toctree.children)
AttributeError: 'NoneType' object has no attribute 'children'

The relevant layout file can be viewed at https://github.com/EllisLab/CodeIgniter/blob/develop/user_guide_src/source/_themes/eldocs/layout.html

Compile fails with 1.2b1 but not 1.1.3

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.