Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Admin 500 Error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bret W  
View profile  
 More options Sep 8 2008, 7:59 pm
From: Bret W <bretwal...@gmail.com>
Date: Mon, 8 Sep 2008 16:59:45 -0700 (PDT)
Local: Mon, Sep 8 2008 7:59 pm
Subject: Admin 500 Error
I can only get this error to show up if DEBUG is set to False, but it
happens consistently when debugging is off.

MOD_PYTHON ERROR

ProcessId:      10229
Interpreter:    'webfaction.com'

ServerName:     'webfaction.com'
DocumentRoot:   '/home/user/webapps/mysite/django_static'

URI:            '/admin/'
Location:       '/'
Directory:      None
Filename:       '/home/user/webapps/mysite/django_static/admin'
PathInfo:       '/'

Phase:          'PythonHandler'
Handler:        'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/home/user/lib/python2.5/mod_python/importer.py", line 1537,
in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/home/user/lib/python2.5/mod_python/importer.py", line 1229,
in _process_target
    result = _execute_target(config, req, object, arg)

  File "/home/user/lib/python2.5/mod_python/importer.py", line 1128,
in _execute_target
    result = object(arg)

  File "/home/user/lib/python2.5/django/core/handlers/modpython.py",
line 222, in handler
    return ModPythonHandler()(req)

  File "/home/user/lib/python2.5/django/core/handlers/modpython.py",
line 195, in __call__
    response = self.get_response(request)

  File "/home/user/lib/python2.5/django/core/handlers/base.py", line
128, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)

  File "/home/user/lib/python2.5/django/core/handlers/base.py", line
160, in handle_uncaught_exception
    return callback(request, **param_dict)

  File "/home/user/lib/python2.5/django/views/defaults.py", line 88,
in server_error
    t = loader.get_template(template_name) # You need to create a
500.html template.

  File "/home/user/webapps/mysite/django_projects/bretwcom/
__init__.py", line 11, in cached_get_template
    template_cache[template_name] = t =
original_get_template(template_name)

  File "/home/user/webapps/mysite/django_projects/bretwcom/
__init__.py", line 11, in cached_get_template
    template_cache[template_name] = t =
original_get_template(template_name)

  File "/home/user/lib/python2.5/django/template/loader.py", line 80,
in get_template
    source, origin = find_template_source(template_name)

  File "/home/user/lib/python2.5/django/template/loader.py", line 73,
in find_template_source
    raise TemplateDoesNotExist, name

TemplateDoesNotExist: 500.html

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Nothing shows up in the Apache log, and since
django.views.defaults.server_error passes an empty Context object, the
only way I can see what's happening is to have mod_python throw the
error.

Does anyone know why this is happening?  Any leads would be
appreciated.

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malcolm Tredinnick  
View profile  
 More options Sep 8 2008, 8:57 pm
From: Malcolm Tredinnick <malc...@pointy-stick.com>
Date: Mon, 08 Sep 2008 17:57:19 -0700
Local: Mon, Sep 8 2008 8:57 pm
Subject: Re: Admin 500 Error

On Mon, 2008-09-08 at 16:59 -0700, Bret W wrote:
> I can only get this error to show up if DEBUG is set to False,

Because that's when Django is not going to use the debugging page, but
rather display your 500 template. When DEBUG=True, you will see the nice
debugging page, but that's for development purposes, not for general
production use (although it can be useful to have it on for brief
periods in production to diagnose problems).

> but it
> happens consistently when debugging is off.

Which means that your site is consistently throwing some kind of
internal error.

You are responsible for providing a 500.html template that will be
returned to your users when an internal, uncaught error is thrown. That
still won't provide you with any extra debugging information, unless you
enable mailing to the admins (which will then send 500 errors to you).
You could set DEBUG=True for a while if you can trigger the problem
yourself and then use the debug screen to diagnose the problem, but if
it is only occurring sporadically, that won't be as productive.

Regards,
Malcolm


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bret W  
View profile  
 More options Sep 8 2008, 9:31 pm
From: Bret W <bretwal...@gmail.com>
Date: Mon, 8 Sep 2008 18:31:04 -0700 (PDT)
Local: Mon, Sep 8 2008 9:31 pm
Subject: Re: Admin 500 Error
On Sep 8, 8:57 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:

> Because that's when Django is not going to use the debugging page, but
> rather display your 500 template. When DEBUG=True, you will see the nice
> debugging page, but that's for development purposes, not for general
> production use (although it can be useful to have it on for brief
> periods in production to diagnose problems).

I probably wasn't very clear.

When DEBUG = True, the admin loads just fine.

My problem is that I can't get the admin to fail when debugging is
turned on, so I can never see the helpful Django debugging page.

Further, I don't believe any objects are passed to the 500 template,
so I can't display errors using my template. That's why I removed my
500.html template -- so that mod_python would throw the (nasty
looking) error.

I'm trying to figure out a) why the admin is throwing errors only when
DEBUG=False and b) how I can display the source of the error.

Thanks,
Bret


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bret W  
View profile  
 More options Sep 8 2008, 9:37 pm
From: Bret W <bretwal...@gmail.com>
Date: Mon, 8 Sep 2008 18:37:15 -0700 (PDT)
Local: Mon, Sep 8 2008 9:37 pm
Subject: Re: Admin 500 Error
Sorry to post yet again.

Two things I forgot to mention -- this error only happens on the admin
home page and all of my INSTALLED_APPS should be valid and seem to be
functioning correctly.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karen Tracey  
View profile  
 More options Sep 8 2008, 9:43 pm
From: "Karen Tracey" <kmtra...@gmail.com>
Date: Mon, 8 Sep 2008 21:43:32 -0400
Local: Mon, Sep 8 2008 9:43 pm
Subject: Re: Admin 500 Error

To get the traceback mailed to you, include your userid in the ADMINS list
in settings.py and set the various EMAIL_ settings to specify a valid mail
server and source email id (see
http://docs.djangoproject.com/en/dev/ref/settings/#email-host).

I am aware of one problem reported with the admin home page and debug set to
False.  It is:

http://code.djangoproject.com/ticket/8110

It's a shot in the dark, but you could try applying the 8110.diff posted on
that ticket and seeing if it fixes the problem.  I have not been able to
recreate this problem myself.

Karen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bret W  
View profile  
 More options Sep 9 2008, 7:08 pm
From: Bret W <bretwal...@gmail.com>
Date: Tue, 9 Sep 2008 16:08:41 -0700 (PDT)
Local: Tues, Sep 9 2008 7:08 pm
Subject: Re: Admin 500 Error

On Sep 8, 9:43 pm, "Karen Tracey" <kmtra...@gmail.com> wrote:

> I am aware of one problem reported with the admin home page and debug set to
> False.  It is:

> http://code.djangoproject.com/ticket/8110

That was it. Thanks!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »