Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:50:41+00:00 2026-06-07T11:50:41+00:00

Whenever there is an error in an inherited Jinja2 template in my App Engine

  • 0

Whenever there is an error in an inherited Jinja2 template in my App Engine project, I get a traceback that specifies only the line that caused the inheritance, not the line that caused the error.

For example, I created a dummy project with two templates, page.html and base.html. page.html inherits from base.html and base.html has the line designed to cause an error. Rather than reporting the error in base.html, App Engine/Jinja will give me this traceback:

Traceback (most recent call last):
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 1536, in __call__
    rv = self.handle_exception(request, response, e)
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 1530, in __call__
    rv = self.router.dispatch(request, response)
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/home/kkinder/Projects/JinjaTestProject/main.py", line 11, in get
    self.response.out.write(self.jinja2.render_template('page.html'))
  File "/home/kkinder/Software/google_appengine/lib/webapp2/webapp2_extras/jinja2.py", line 158, in render_template
    return self.environment.get_template(_filename).render(**context)
  File "/home/kkinder/Software/google_appengine/lib/jinja2/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "templates/page.html", line 1, in top-level template code
    {% extends 'base.html' %}
UndefinedError: 'doesnotexist' is undefined

main.py:

import webapp2
from webapp2_extras import jinja2

class MainHandler(webapp2.RequestHandler):
    @webapp2.cached_property
    def jinja2(self):
        return jinja2.get_jinja2(app=self.app)

    def get(self):
        self.response.out.write(self.jinja2.render_template('page.html'))

app = webapp2.WSGIApplication([('/', MainHandler)],
                             debug=True)

page.html:

{% extends 'base.html' %}
{% block content %}
    Stuff
{% endblock %}

base.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
<body>
<h1>{{ doesnotexist.foo }}</h1>
    {% block content %}{% endblock %}
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:50:42+00:00Added an answer on June 7, 2026 at 11:50 am

    Unfortunately, it’s not possible to get better debug information for Jinja2 on GAE in production, because they have restricted the access to the required packages. You can find more information about this problem on the official FAQ: My tracebacks look weird. What’s happening?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a Flex Project, whenever there's an error, I fill in the error data
This query gives an error whenever there are more than 1 record that exists
I have configured a SMTP appender to send an email whenever there's an error.
I have a Flash app with a PHP backend. Whenever there is a PHP
Is there ASP button that won't submit post form data. Whenever I click an
I want to alert the user whenever there's an AJAX error. You can do
This is the code i use to insert record. Whenever there is insert error
I want the required field validator to become only visible whenever there is an
Since today, Qt Creator's debugger crashes whenever there is an error. Breakpoints no longer
We have an application running built on python/django. I get emails whenever there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.