Why do my django email error reports have weird characters in the subject?

19 views
Skip to first unread message

Tal

unread,
Jul 19, 2019, 11:46:20 AM7/19/19
to Django users

I setup my django 2.2.3 project to use gmail to send emails out.

I also have it configured to send me emails about any exceptions that occur.

To test it, I made a view with:


float('a')

It works, but there are weird characters in the subject of the email I receive, and in the first part of the message. I think those are bash color code characters.

Why am I seeing them? Is this a Django bug? Any way to fix it?




Screen Shot 2019-07-19 at 9.38.26 AM.png


Tal

unread,
Jul 19, 2019, 1:31:26 PM7/19/19
to Django users
Is this possibly related to the fact that I have django-channels enabled?
I'll try disabling it to see if it's related.

Tal

unread,
Jul 19, 2019, 4:02:47 PM7/19/19
to Django users
Ended up being related to the other problem I was having, where I was getting 2 emails for every exception, and both problems were caused by enabled django-channels.

Disabling django channels, or running django-channels in production with daphne, rather than using the channels ASGI development server, everything works - I only get one email, and its formatting is fine. The channels development server though sends me 2 emails if an exception is thrown, and one of the emails has those weird characters.

If anyone knows a way to fix this, let me know. If not, I'll just have to ignore it. I guess it doesn't really bother me if it doesn't happen in production.
Reply all
Reply to author
Forward
0 new messages