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 7955907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:49:52+00:00 2026-06-04T03:49:52+00:00

When I visit a page (http://68.123.151.234/static/quickstart.html) in my Django application served on a server

  • 0

When I visit a page (http://68.123.151.234/static/quickstart.html) in my Django application served on a server spawned by Django, the page reads

A server error occurred.  Please contact the administrator.

And I receive this traceback.

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 153, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, in server_error
    t = loader.get_template(template_name) # You need to create a 500.html template.
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 145, in get_template
    template, origin = find_template(template_name)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 138, in find_template
    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html
[17/May/2012 11:31:45] "GET /static/quickstart.html HTTP/1.1" 500 59
Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 153, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/defaults.py", line 32, in server_error
    t = loader.get_template(template_name) # You need to create a 500.html template.
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 145, in get_template
    template, origin = find_template(template_name)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py", line 138, in find_template
    raise TemplateDoesNotExist(name)
TemplateDoesNotExist: 500.html

This traceback only tells me that I need a 500 template – not what the actual server error is. How can I find out what the server error was?

I checked out Django documentation (https://docs.djangoproject.com/en/1.4/topics/http/views/), which directs me to create a 500 error template as a potential solution. However, it gives no instructions as to how to display the error within such a template.

  • 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-04T03:49:53+00:00Added an answer on June 4, 2026 at 3:49 am

    A basic 500.html which is convenient and useful would, as Alasdair said, potentially reveal something sensitive.

    However, if debugging over the web in a responsible way is the objective, a basic nondefault500.html template for your site template dir would look like

    <html><head><body>
    <!-- starting with sys.exc_info but hey, it's python -->
    Type: {{ type }} <br />
    Value: {{ value }} <br />
    Traceback: {{ traceback }} <br />
    </body></head></html>
    

    and the new handler would populate that context as such:

    def this_server_error(request, template_name='nondefault500.html'):
        """
        500 error handler.
    
        Templates: `500.html`
        Context: sys.exc_info() results
         """
        t = loader.get_template(template_name) # You need to create a 500.html template.
        ltype,lvalue,ltraceback = sys.exc_info()
        sys.exc_clear() #for fun, and to point out I only -think- this hasn't happened at 
                        #this point in the process already
        return http.HttpResponseServerError(t.render(Context({'type':ltype,'value':lvalue,'traceback':ltraceback})))
    

    and there would need to be a URLconf adjustment made,

    handler500 = 'mysite.views.this_server_error'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please visit this page: http://hyindia.com/demo/agenda/index.html On Top Menu, You can see the Buttons/Links and
If you visit this page in Firefox 3.6: http://unirazz.com/images/ww/home.html There is a space of
Please visit http://domenadesign.com/istra-bike.com with Firefox browser! After a few clicks on the links page
I would like to forward users using .htaccess When they visit the page: http://www.example.com/add_event/
Please visit this page : http://portal.acm.org/citation.cfm?id=1531914.1531927&coll=DL&dl=ACM&CFID=34528024&CFTOKEN=57549708 there is a 'Export Formats' section in the
If you visit this page: http://basecamphq.com/tour/ and click on the tour left hand side
Following is a script+HTML that tells the user his last visit to page. <html
If you visit this page in Chrome: http://www.immigrationconsult.org/contact.php And Inspect Element on the page,
So anytime someone visits this page: http://www.site.com/page/image_(.*).png They get redirected to the cdn url,
I'm trying to visit a page with cucumber, with: visit new_video_path but I get

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.