Email Backend setting needed, a potential bug

24 views
Skip to first unread message

Lakshman Prasad

unread,
May 25, 2010, 2:54:37 PM5/25/10
to django...@googlegroups.com
Hi,

Since I upgraded to 1.1.2, I am unable to send mails as django seems expecting a EMAIL_BACKEND.

I tried to simply downgrade back to 1.1.1 not having to bother, but the error continues.

I seems like a bug, but I don't know how it can be one, because, I cant see how sending email can go untested.

Any pointers to what I am doing wrong, or if something is wrong in django, appreciated. Thanks.

Following is the trraceback:

File "/usr/local/lib/python2.6/dist-packages/django/core/mail/__init__.py" in send_mail
  59.                                     fail_silently=fail_silently)
File "/usr/local/lib/python2.6/dist-packages/django/core/mail/__init__.py" in get_connection
  29.     path = backend or settings.EMAIL_BACKEND
File "/usr/local/lib/python2.6/dist-packages/django/utils/functional.py" in __getattr__
  273.         return getattr(self._wrapped, name)
Exception Type: AttributeError at /home/
Exception Value: 'Settings' object has no attribute 'EMAIL_BACKEND'

Russell Keith-Magee

unread,
May 26, 2010, 3:04:21 AM5/26/10
to django...@googlegroups.com
On Wed, May 26, 2010 at 2:54 AM, Lakshman Prasad <scorp...@gmail.com> wrote:
> Hi,
> Since I upgraded to 1.1.2, I am unable to send mails as django seems
> expecting a EMAIL_BACKEND.

Something is severely broken with your setup, then. EMAIL_BACKEND is a
setting that was introduced in Django 1.2, but it doesn't exist in
1.1.1 or 1.1.2.

So - somehow you've managed to install Django 1.2, and that is what is
being found by Python. Your stack trace also confirms this -
django.core.mail is a module on Django 1.1.X, and a directory on 1.2.
The stack trace you provide shows that you've got a directory.

Yours,
Russ Magee %-)

ankit rai

unread,
May 26, 2010, 4:36:27 AM5/26/10
to django...@googlegroups.com
check your django version .It might be that you have django at two places .I m using django 1.1 , have not fount such problem


--
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.


Lakshman Prasad

unread,
May 26, 2010, 4:36:56 AM5/26/10
to django...@googlegroups.com
So, I see what has happened. (Interesting it is)

I upgraded django to 1.2 to try out:

$pip install --upgrade django

Then, back to work again:

$pip install django==1.1.2

I don't think pip removed the pyc files when replacing, which is making it import mail module.

So, This problem should be solved if I removed all pycs. I did.

$find -name "*.pyc" -delete

I still have the same problem.

I am sure, I am using 1.1.1 right now, because in my view I do:

import django
django.get_version()

and it prints:
1.1.1

(This is no major problem, I know I can delete the entire folder and install again. But it is interesting how it happened, which could be a bug in pip.)


On Wed, May 26, 2010 at 12:34 PM, Russell Keith-Magee <rus...@keith-magee.com> wrote:
Reply all
Reply to author
Forward
0 new messages