On 15 Mrz., 22:42, Kevin Horn <[email protected]> wrote: > On Mon, Mar 15, 2010 at 3:25 PM, andreash <[email protected]> wrote: > > Hmmm ... > > > Works fine for a toctree which is not in my master document. However, > > when I apply the same to my master document, I get an error (see > > below). The toctree inside my main index.txt looks like this: > > > .. toctree:: > > :maxdepth: 2 > > :titlesonly: > > :hidden: > > > profil > > projekte > > partner > > kontakt > > impressum > > > And the error I get is this: > > > # Sphinx version: 1.0 > > # Docutils version: 0.5 release > > # Jinja2 version: 2.1.1 > > Traceback (most recent call last): > > File "/home/andreas/lib/python2.6/sphinx/sphinx/cmdline.py", line > > 170, in main > > app.build(all_files, filenames) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/application.py", > > line 144, in build > > self.builder.build_update() > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/ > > __init__.py", line 265, in build_update > > 'out of date' % len(to_build)) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/ > > __init__.py", line 320, in build > > self.write(docnames, list(updated_docnames), method) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/ > > __init__.py", line 359, in write > > self.write_doc(docname, doctree) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py", > > line 380, in write_doc > > self.handle_page(docname, ctx, event_arg=doctree) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py", > > line 743, in handle_page > > output = self.templates.render(templatename, ctx) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/jinja2glue.py", line > > 107, in render > > return self.environment.get_template(template).render(context) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/ > > page.html", line 10, in top-level template code > > {% extends "layout.html" %} > > File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ > > layout.html", line 11, in top-level template code > > {% extends "basic/layout.html" %} > > File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/ > > layout.html", line 149, in top-level template code > > {%- block content %} > > File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ > > layout.html", line 52, in block "content" > > {%- block sidebartoc %} > > File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/ > > layout.html", line 54, in block "sidebartoc" > > {{ toctree(collapse=True) }} > > File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6- > > linux-x86_64.egg/jinja2/sandbox.py", line 238, in call > > return __context.call(__obj, *args, **kwargs) > > File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6- > > linux-x86_64.egg/jinja2/runtime.py", line 132, in call > > return __obj(*args, **kwargs) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py", > > line 735, in <lambda> > > ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename, > > **kw) > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py", > > line 680, in _get_local_toctree > > docname, self, collapse))['fragment'] > > File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py", > > line 200, in render_partial > > doc.append(node) > > File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 554, > > in append > > self.setup_child(item) > > File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 95, > > in setup_child > > child.parent = self > > AttributeError: 'NoneType' object has no attribute 'parent' > > > Any idea what might be happening? > > > Thanks for your insight, > > > Andreas. > > Try taking out the :maxdepth: option > > Kevin Horn
No change, unfortunately. Error log is exactly the same. Tried taking out :maxdepth:, tried taking out :titlesonly:, tried taking out self. All to no avail :( Andreas. -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.
