Setting DEBUG = False causes 500 Error

4,048 views
Skip to first unread message

Damon Jablons

unread,
Jan 25, 2010, 3:37:45 PM1/25/10
to Django users
I work on my django site locally, and pull from the repository
remotely. On my local machine, I have DEBUG = True, and on my remote
machine I have DEBUG = False. Whenever I set the server's DEBUG to
False, the server presents a 500 error, and there's nothing to be
found in the Apache logs. If I set DEBUG to True, the site runs
perfectly fine.

Can anyone shed some light on this issue?

Here's my settings.py and local_settings.py on dpate.com: http://dpaste.com/150368/

Ted Nyman

unread,
Jan 25, 2010, 3:40:43 PM1/25/10
to django...@googlegroups.com
Have you created a 404.html and 500.html in your template directory?


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Damon Jablons

unread,
Jan 25, 2010, 4:05:57 PM1/25/10
to Django users
I do have a 400 and 500 error page.

I've been mulling over this issue for a couple days and I just
discovered what it was. I was using the css/js compression app called
"compress" which only runs if DEBUG=True. It was throwing some error,
so I removed it and things work fine now.

In the immortal words of Homer Simpson, "Do'h!"

On Jan 25, 3:40 pm, Ted Nyman <tnm...@gmail.com> wrote:
> Have you created a 404.html and 500.html in your template directory?
>

> On Mon, Jan 25, 2010 at 12:37 PM, Damon Jablons <damonjabl...@gmail.com>wrote:
>
> > I work on my django site locally, and pull from the repository
> > remotely. On my local machine, I have DEBUG = True, and on my remote
> > machine I have DEBUG = False. Whenever I set the server's DEBUG to
> > False, the server presents a 500 error, and there's nothing to be
> > found in the Apache logs. If I set DEBUG to True, the site runs
> > perfectly fine.
>
> > Can anyone shed some light on this issue?
>
> > Here's my settings.py and local_settings.py on dpate.com:
> >http://dpaste.com/150368/
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > django-users...@googlegroups.com<django-users%2Bunsu...@googlegroups.com>

Atamert Ölçgen

unread,
Jan 25, 2010, 4:03:11 PM1/25/10
to django...@googlegroups.com
Hi Damon,

On Monday 25 January 2010 22:37:45 Damon Jablons wrote:
> I work on my django site locally, and pull from the repository
> remotely. On my local machine, I have DEBUG = True, and on my remote
> machine I have DEBUG = False. Whenever I set the server's DEBUG to
> False, the server presents a 500 error, and there's nothing to be
> found in the Apache logs. If I set DEBUG to True, the site runs
> perfectly fine.

The server presents 500 on which URL? Is the `server` local machine or the
remote machine? Are you getting this error on development server or mod_wsgi
etc? How do you serve static files?


> Can anyone shed some light on this issue?

If your message was intented for telepathic group members please ignore my
questions above.


http://catb.org/~esr/faqs/smart-questions.html


--
Saygılarımla,
Atamert Ölçgen

-+-
--+
+++

www.muhuk.com
mu...@jabber.org

Damon Jablons

unread,
Jan 26, 2010, 12:40:47 AM1/26/10
to Django users
Thank you for the concern.

I included a link to dpaste in my original response, but I think
google groups cut it out:
"Here's my settings.py and local_settings.py on dpa(s)te.com:
http://dpaste.com/150368/ "

Karen Tracey

unread,
Jan 26, 2010, 11:02:08 AM1/26/10
to django...@googlegroups.com
2010/1/26 Damon Jablons <damonj...@gmail.com>
Thank you for the concern.

I included a link to dpaste in my original response, but I think
google groups cut it out:
"Here's my settings.py and local_settings.py on dpa(s)te.com:
http://dpaste.com/150368/ "


To debug a problem that only appears with DEBUG=False, you must set ADMINS to include a valid email address to send error reports to.  (Depending on your machine setup, you may also need to set EMAIL_HOST and other EMAIL_XXX values so Django can successfully send mail).  You don't appear to have done this, since the only "person" you have listed in ADMINS is John Doe with a pretty clearly fictional email address.

See: http://docs.djangoproject.com/en/dev/ref/settings/#admins

Karen

Eki

unread,
Apr 12, 2020, 10:47:22 AM4/12/20
to Django users
I ran into exatly the same issue just now (10 years after your post). When I use compress in production with DEBUG=False, I get a 500 error. I wish I had read your post 5 hours ago... Everything works fine now.

-- Eki
Reply all
Reply to author
Forward
0 new messages