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

Templates can no longer be found in plugins #3725

Closed
Kwpolska opened this issue Jan 1, 2024 · 0 comments · Fixed by #3728
Closed

Templates can no longer be found in plugins #3725

Kwpolska opened this issue Jan 1, 2024 · 0 comments · Fixed by #3728
Assignees
Labels

Comments

@Kwpolska
Copy link
Member

Kwpolska commented Jan 1, 2024

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'
@Kwpolska Kwpolska self-assigned this Jan 2, 2024
@Kwpolska Kwpolska changed the title Templates can no longer be found in templates Templates can no longer be found in plugins Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant