Skip to content

jinja2.exceptions.TemplateNotFound #13

Description

@terrencee

The code for the starter template of bootstrap has changed.
However, I used your code but its throwing an exception ;
jinja2.exceptions.TemplateNotFound: includes/_navabar.html

_**Traceback (most recent call last)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 2309, in call
return self.wsgi_app(environ, start_response)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 2295, in wsgi_app
response = self.handle_exception(e)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask_compat.py", line 35, in reraise
raise value
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "F:\Girivraaj\P\Py_webb\Flask\project_1\app.py", line 7, in index
return render_template('home.html')
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\templating.py", line 135, in render_template
context, ctx.app)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\templating.py", line 117, in _render
rv = template.render(context)
File "E:\I_Need\P\PYTHON\lib\site-packages\jinja2\asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "E:\I_Need\P\PYTHON\lib\site-packages\jinja2\environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "E:\I_Need\P\PYTHON\lib\site-packages\jinja2\environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "E:\I_Need\P\PYTHON\lib\site-packages\jinja2_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "F:\Girivraaj\P\Py_webb\Flask\project_1\templates\home.html", line 1, in top-level template code
{% extends 'layout.html' %}
File "F:\Girivraaj\P\Py_webb\Flask\project_1\templates\layout.html", line 13, in top-level template code
{% include 'includes/_navabar.html' %}
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\templating.py", line 58, in get_source
return self._get_source_fast(environment, template)
File "E:\I_Need\P\PYTHON\lib\site-packages\flask\templating.py", line 86, in _get_source_fast
raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: includes/_navabar.html
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object**_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions