getnikola/nikola

Templates can no longer be found in plugins

Kwpolska opened this issue · 0 comments

Environment

Python Version: 3.11.6

Nikola Version: GitHub master

Operating System: Linux

Description:

Traceback (most recent call last):
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/mako/lookup.py", line 240, in get_template
    return self._check(uri, self._collection[uri])
                            ~~~~~~~~~~~~~~~~^^^^^
KeyError: 'localsearch.tmpl'

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

Traceback (most recent call last):
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/doit/doit_cmd.py", line 294, in run
    return command.parse_execute(args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/doit/cmd_base.py", line 150, in parse_execute
    return self.execute(params, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/doit/cmd_base.py", line 556, in execute
    self.task_list = self.loader.load_tasks(cmd=self, pos_args=args)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/git/nikola/nikola/__main__.py", line 285, in load_tasks
    tasks = generate_tasks(
            ^^^^^^^^^^^^^^^
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/doit/loader.py", line 390, in generate_tasks
    for task_dict, x_doc in flat_generator(gen_result, gen_doc):
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/doit/loader.py", line 27, in flat_generator
    for item in gen:
  File "/home/kwpolska/git/nikola/nikola/nikola.py", line 2093, in gen_tasks
    for task in flatten(pluginInfo.plugin_object.gen_tasks()):
  File "/home/kwpolska/git/nikola/nikola/nikola.py", line 2087, in flatten
    for t in task:
  File "/home/kwpolska/git/nikola/nikola/plugins/task/pages.py", line 66, in gen_tasks
    for task in self.site.generic_page_renderer(lang, post, kw["filters"], context):
  File "/home/kwpolska/git/nikola/nikola/nikola.py", line 2395, in generic_page_renderer
    yield self.generic_renderer(lang, output_name, post.template_name, filters,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/git/nikola/nikola/nikola.py", line 2305, in generic_renderer
    file_deps += self.template_system.template_deps(template_name, template_dep_context)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/git/nikola/nikola/plugins/template/mako.py", line 135, in template_deps
    template = self.lookup.get_template(template_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kwpolska/virtualenvs/nikola/lib64/python3.11/site-packages/mako/lookup.py", line 253, in get_template
    raise exceptions.TopLevelLookupException(
mako.exceptions.TopLevelLookupException: Can't locate template for uri 'localsearch.tmpl'