I am testing mkdocs and I get the following backtrace.
Traceback (most recent call last):
File "/srv/mkdocs_head/bin/mkdocs", line 9, in <module>
load_entry_point('mkdocs==0.14.0.dev', 'console_scripts', 'mkdocs')()
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/click/core.py", line 664, in __call__
return self.main(*args, **kwargs)
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/click/core.py", line 644, in main
rv = self.invoke(ctx)
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/click/core.py", line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/click/core.py", line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/click/core.py", line 464, in invoke
return callback(*args, **kwargs)
File "/home/zmousm/mkdocs/mkdocs/cli.py", line 134, in build_command
), clean_site_dir=clean)
File "/home/zmousm/mkdocs/mkdocs/build.py", line 299, in build
build_pages(config)
File "/home/zmousm/mkdocs/mkdocs/build.py", line 252, in build_pages
build_extra_templates(config['extra_templates'], config, site_navigation)
File "/home/zmousm/mkdocs/mkdocs/build.py", line 230, in build_extra_templates
output_content = template.render(context)
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/srv/mkdocs_head/local/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "<template>", line 44, in top-level template code
TypeError: no loader for this environment specified
It appears to be related to extra_templates, even though I am not using any such thing in my config; I have actually removed any theme/theme_dir setting I had in the config and I still get this.
I can see build_extra_templates() was introduced in 26f2465; I can reproduce the same problem in every release after 0.12.2.
I am testing on a Debian wheezy system (python 2.7.3), in a newly created virtualenv where the following modules have been installed:
Well, I found the problem. I had theme_dir pointing to a subdirectory of docs_dir, so mkdocs indeed finds templates, which are there to override theme templates, however. Once I move theme_dir outsidedocs_dir`, the issue goes away.
I don't know if this backtrace should be expected though? The docs don't warn against this.
Yup, that's a fair point. I hadn't considered people putting theme_dir's within the docs_dirs. I think maybe we should make extra_templates an opt-in feature only. At the moment MkDocs will try to build any html or XML files it finds in the docs directory.
I am testing mkdocs and I get the following backtrace.
It appears to be related to
extra_templates
, even though I am not using any such thing in my config; I have actually removed any theme/theme_dir setting I had in the config and I still get this.I can see
build_extra_templates()
was introduced in 26f2465; I can reproduce the same problem in every release after 0.12.2.I am testing on a Debian wheezy system (python 2.7.3), in a newly created virtualenv where the following modules have been installed:
Any ideas?
The text was updated successfully, but these errors were encountered: