# Revision history [back]

### auth-related outbound email not working (NoneType object has no attribute 'get_text')

Running askbot-devel from github and django 1.4.5.

I've configured SMTP info in settings.py and tested my smtp server manually, with the feedback link in askbot and with answer notifications and they seem to work fine.

However, when I sign up a new account or request an account recovery password, I don't get an email and I just see the following in the logs which isn't very helpful or much to go on:

  [Fri May 24 11:16:18 2013] [error] 'NoneType' object has no attribute 'get_text'


That's it. No stack trace and nothing before or after it. I'm assuming this is the cause because it pops up only when I try the tasks above. Anyone have any hints as to where I could debug?

I noticed that mail/__init__.py has a clean_html_email() method with the following line:

phrases = map(
lambda s: s.strip(),
filter(filter_func, body_element.get_text().split('\n'))
)


But the above tasks don't appear to hit this code as I tried adding logging statements and even commenting it out and got the same error in the logs after restarting.

Also, having DEBUG=True didn't give me any more to go on either. No error occurs in the browser, only in the log, and only that one line.

### auth-related outbound email not working (NoneType object has no attribute 'get_text')

Running askbot-devel from github and django 1.4.5.

I've configured SMTP info in settings.py and tested my smtp server manually, with the feedback link in askbot and with answer notifications and they seem to work fine.

However, when I sign up a new account or request an account recovery password, I don't get an email and I just see the following in the logs which isn't very helpful or much to go on:

  [Fri May 24 11:16:18 2013] [error] 'NoneType' object has no attribute 'get_text'


That's it. No stack trace and nothing before or after it. I'm assuming this is the cause because it pops up only when I try the tasks above. Anyone have any hints as to where I could debug?

I noticed that mail/__init__.py has a clean_html_email() method with the following line:

phrases = map(
lambda s: s.strip(),
filter(filter_func, body_element.get_text().split('\n'))
)


But the above tasks don't appear to hit this code as I tried adding logging statements and even commenting it out and got the same error in the logs after restarting.

Also, having DEBUG=True didn't give me any more to go on either. No error occurs in the browser, only in the log, and only that one line.

### auth-related outbound email not working (NoneType object has no attribute 'get_text')

Running askbot-devel from github and django 1.4.5.

I've configured SMTP info in settings.py and tested my smtp server manually, with the feedback link in askbot and with answer notifications and they seem to work fine.

However, when I sign up a new account or request an account recovery password, I don't get an email and I just see the following in the logs which isn't very helpful or much to go on:

  [Fri May 24 11:16:18 2013] [error] 'NoneType' object has no attribute 'get_text'


That's it. No stack trace and nothing before or after it. I'm assuming this is the cause because it pops up it.

The only when I try the tasks above. Anyone have any hints as to where I could debug?

I noticed that get_text I found using grep was in mail/__init__.py has a clean_html_email() method with the following line::

phrases = map(
lambda s: s.strip(),
filter(filter_func, body_element.get_text().split('\n'))
)


But the above tasks don't appear to hit this code as I tried adding logging statements and even commenting it Commenting that out and got the same error in the logs after restarting.

Also, didn't work, having DEBUG=True didn't give me any more to go on either. No error occurs in the browser, only in the log, and only that one line.

Update:

I see another potential cause. I was stepping through the code in the django shell and found this in askbot/deps/django_authopenid/views.py in send_email_key()

subject = _("Recover your %(site)s account") % \


That failed for me in the shell, and forgive me if I'm missing something, but is that _ supposed to be at the beginning of that line? Needless to say, removing it still didn't deliver my email. And when I trun this in the shell I get the same error.

askbot.deps.django_authopenid.views.send_email_key('myemail@example.com', '12345')

'NoneType' object has no attribute 'get_text'


I also tested on the current askbot.org site to try and send a password reset and never got any email so it seems to be broken? Does anyone else have this working?

### auth-related outbound email not working (NoneType object has no attribute 'get_text')

Running askbot-devel from github and django 1.4.5.

I've configured SMTP info in settings.py and tested my smtp server manually, with the feedback link in askbot and with answer notifications and they seem to work fine.

However, when I sign up a new account or request an account recovery password, I don't get an email and I just see the following in the logs which isn't very helpful or much to go on:

  [Fri May 24 11:16:18 2013] [error] 'NoneType' object has no attribute 'get_text'


That's it. No stack trace and nothing before or after it.

The only get_text I found using grep was in mail/__init__.py clean_html_email():

phrases = map(
lambda s: s.strip(),
filter(filter_func, body_element.get_text().split('\n'))
)


Commenting that out didn't work, having DEBUG=True didn't give me any more to go on either. No error occurs in the browser, only in the log, and only that one line.

Update:

I see another potential cause. I was stepping through the code in the django shell and found this in askbot/deps/django_authopenid/views.py in send_email_key()

subject = _("Recover your %(site)s account") % \

That failed for me in the shell, and forgive me if I'm missing something, but is that _ supposed to be at the beginning of that line? Needless to say, removing I've narrowed it still didn't deliver my email. And when I trun down to deps.django_authopenid.views.send_email_key(). When I run this in the shell I get the same error.
askbot.deps.django_authopenid.views.send_email_key('myemail@example.com', '12345')