On Tue, 7 May 2024 at 19:33, Lars Bjørndal <[email protected]> wrote:
>
> Hello!
>
> I've installed the latest nikola 8.3.1 within a virtualenv. When trying to do
> `nikola build`, I get an error message:
>
> ERROR: Nikola: mako.exceptions.TopLevelLookupException: Can't locate
> template for uri 'annotation_helper.tmpl'.
>
> I'll paste the complete output below. How can I solve this problem?
>
>
> =====
>
> Scanning posts......done!
> --- Logging error ---
> Traceback (most recent call last):
>   File "/usr/lib64/python3.12/logging/__init__.py", line 1160, in emit
>     msg = self.format(record)
>           ^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 999, in format
>     return fmt.format(record)
>            ^^^^^^^^^^^^^^^^^^
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/log.py", 
> line 64, in format
>     message = super().format(record)
>               ^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 703, in format
>     record.message = record.getMessage()
>                      ^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 392, in getMessage
>     msg = msg % self.args
>           ~~~~^~~~~~~~~~~
> TypeError: not all arguments converted during string formatting
> Call stack:
>   File "/home/lrs/tmp/venv/bin/nikola", line 8, in <module>
>     sys.exit(main())
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 166, in main
>     _ = DN.run(oargs)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 382, in run
>     return super().run(cmd_args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/doit_cmd.py", 
> line 294, in run
>     return command.parse_execute(args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/cmd_base.py", 
> line 150, in parse_execute
>     return self.execute(params, args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/cmd_base.py", 
> line 556, in execute
>     self.task_list = self.loader.load_tasks(cmd=self, pos_args=args)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 285, in load_tasks
>     tasks = generate_tasks(
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/loader.py", 
> line 390, in generate_tasks
>     for task_dict, x_doc in flat_generator(gen_result, gen_doc):
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/loader.py", 
> line 27, in flat_generator
>     for item in gen:
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2069, in gen_tasks
>     for task in flatten(pluginInfo.plugin_object.gen_tasks()):
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2063, in flatten
>     for t in task:
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/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/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2371, in generic_page_renderer
>     yield self.generic_renderer(lang, output_name, post.template_name, 
> filters,
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2281, in generic_renderer
>     file_deps += self.template_system.template_deps(template_name, 
> template_dep_context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 140, in template_deps
>     deps += self.template_deps(fname.split('/')[-1], context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 140, in template_deps
>     deps += self.template_deps(fname.split('/')[-1], context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 136, in template_deps
>     dep_filenames = self.get_deps(template.filename, context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 84, in get_deps
>     return self.get_string_deps(text, context, filename=filename)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 77, in get_string_deps
>     LOGGER.error("Cannot find template {0} referenced in {1}",
> Message: 'Cannot find template {0} referenced in {1}'
> Arguments: ('annotation_helper.tmpl', 'annotation_helper.tmpl')
> --- Logging error ---
> Traceback (most recent call last):
>   File "/usr/lib64/python3.12/logging/__init__.py", line 1160, in emit
>     msg = self.format(record)
>           ^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 999, in format
>     return fmt.format(record)
>            ^^^^^^^^^^^^^^^^^^
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/log.py", 
> line 64, in format
>     message = super().format(record)
>               ^^^^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 703, in format
>     record.message = record.getMessage()
>                      ^^^^^^^^^^^^^^^^^^^
>   File "/usr/lib64/python3.12/logging/__init__.py", line 392, in getMessage
>     msg = msg % self.args
>           ~~~~^~~~~~~~~~~
> TypeError: not all arguments converted during string formatting
> Call stack:
>   File "/home/lrs/tmp/venv/bin/nikola", line 8, in <module>
>     sys.exit(main())
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 166, in main
>     _ = DN.run(oargs)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 382, in run
>     return super().run(cmd_args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/doit_cmd.py", 
> line 294, in run
>     return command.parse_execute(args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/cmd_base.py", 
> line 150, in parse_execute
>     return self.execute(params, args)
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/cmd_base.py", 
> line 556, in execute
>     self.task_list = self.loader.load_tasks(cmd=self, pos_args=args)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/__main__.py", line 
> 285, in load_tasks
>     tasks = generate_tasks(
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/loader.py", 
> line 390, in generate_tasks
>     for task_dict, x_doc in flat_generator(gen_result, gen_doc):
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/doit/loader.py", 
> line 27, in flat_generator
>     for item in gen:
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2069, in gen_tasks
>     for task in flatten(pluginInfo.plugin_object.gen_tasks()):
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2063, in flatten
>     for t in task:
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/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/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2371, in generic_page_renderer
>     yield self.generic_renderer(lang, output_name, post.template_name, 
> filters,
>   File "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/nikola.py", 
> line 2281, in generic_renderer
>     file_deps += self.template_system.template_deps(template_name, 
> template_dep_context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 140, in template_deps
>     deps += self.template_deps(fname.split('/')[-1], context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 140, in template_deps
>     deps += self.template_deps(fname.split('/')[-1], context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 140, in template_deps
>     deps += self.template_deps(fname.split('/')[-1], context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 136, in template_deps
>     dep_filenames = self.get_deps(template.filename, context)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 84, in get_deps
>     return self.get_string_deps(text, context, filename=filename)
>   File 
> "/home/lrs/tmp/venv/lib64/python3.12/site-packages/nikola/plugins/template/mako.py",
>  line 77, in get_string_deps
>     LOGGER.error("Cannot find template {0} referenced in {1}",
> Message: 'Cannot find template {0} referenced in {1}'
> Arguments: ('annotation_helper.tmpl', 'feeds_translations_helper.tmpl')
> [2024-05-07 19:22:37] ERROR: Nikola: Error loading tasks. An unhandled 
> exception occurred.
> [2024-05-07 19:22:37] ERROR: Nikola: mako.exceptions.TopLevelLookupException: 
> Can't locate template for uri 'annotation_helper.tmpl'
> [2024-05-07 19:22:37] WARNING: Nikola: To see more details, run Nikola in 
> debug mode (set environment variable NIKOLA_DEBUG=1) or use 
> NIKOLA_SHOW_TRACEBACKS=1
>
> =====
>
> Lars

Hi,

Your theme is mentioning a template that was removed in the latest
version. This file will be restored in the next release, but with
empty content.

The easiest fix would be to restore the files in your install as well:
https://github.com/getnikola/nikola/commit/ccf74ad60c8788bc234075936c6e5d37806a6b25

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16

-- 
You received this message because you are subscribed to the Google Groups 
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nikola-discuss/CAMw%2Bj7Lk%2BmuEAD5WCN3wYuK10B347gdRH-uRvPK3Qfnf2eEJqQ%40mail.gmail.com.

Reply via email to