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

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

Closed
shimizukawa opened this issue Jan 3, 2015 · 2 comments
Closed

Comments

@shimizukawa
Copy link
Member

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


@shimizukawa
Copy link
Member Author

From Takayuki Shimizukawa on 2013-05-07 02:50:31+00:00

Duplicate of #1141.

@shimizukawa
Copy link
Member Author

From Takayuki Shimizukawa on 2013-05-07 02:51:46+00:00

Duplicate of #1157 (this is correct issue number)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant