ProjectDrawdown / solutions

The mission of Project Drawdown is to help the world reach “Drawdown”— the point in the future when levels of greenhouse gases in the atmosphere stop climbing and start to steadily decline, thereby stopping catastrophic climate change — as quickly, safely, and equitably as possible.
https://www.drawdown.org/
Other
211 stars 91 forks source link

autodocument builder failed with error "Template Not Found" #522

Closed denised closed 2 years ago

denised commented 2 years ago

It worked when I did it for testing, it failed just now. The only thing that is different is this time I was merging a PR, rather than directly pushing a commit. But I can't see how that would affect the environment that builddocs.sh and runpdoc.py are in.

    raise rewrite_traceback_stack(source=source)
  File "/home/runner/work/solutions/solutions/Documentation/autodocs/templates/module.html.jinja2", line 16, in top-level template code
    {% import 'nav.jinja2' as nv with context %}
  File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/pdoc/templates/default/module.html.jinja2", line 695, in top-level template code
    {%- if loop.nextitem -%}
  File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/pdoc/templates/default/frame.html.jinja2", line 18, in top-level template code
    <body>{% block body %}{% endblock %}</body>
  File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/pdoc/templates/default/module.html.jinja2", line 705, in block 'body'
    {% block nav %}
  File "/home/runner/work/solutions/solutions/Documentation/autodocs/templates/module.html.jinja2", line 18, in block 'nav'
    {{ nv.shared_nav() }}
  File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/jinja2/runtime.py", line 828, in _invoke
    rv = self._func(*arguments)
  File "/home/runner/work/solutions/solutions/Documentation/autodocs/templates/nav.jinja2", line 97, in template
    <label id="navtoggle" for="togglestate" class="pdoc-button">{% include 'navtoggle.svg' %}</label>
  File "/opt/hostedtoolcache/Python/3.9.10/x64/lib/python3.9/site-packages/jinja2/loaders.py", line 214, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: navtoggle.svg
Error: Process completed with exit code 1.
mhils commented 2 years ago

Sorry for the troubles here - this is a result of upgrading to pdoc 9, which moved some internal template assets you depended on (for example navtoggle.svg). I've just pushed pdoc 9.0.1, which does not crash anymore and emits a warning with upgrade instructions instead.

denised commented 2 years ago

@mhils OMG that is customer service above and beyond --- how on earth did you find this! Thank you! I will check on this when I get a chance.

mhils commented 2 years ago

You're welcome! My trick is to monitor https://github.com/search?o=desc&q=pdoc&s=updated&type=Issues after major releases to detect downstream issues. :)

denised commented 2 years ago

Fixed with 49a663