Opened 12 years ago

Closed 11 years ago

#5112 closed (wontfix)

Unicode recipients in settings ADMINS and MANAGERS

Reported by: zodi Owned by: nobody
Component: runserver Version: master
Severity: Keywords: unicode Settings ADMINS MANAGERS
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Following the unicode merge.
Settings documentation should point out that full names for recipients in ADMINS and MANAGERS must be defined as u'' if it contains none ASCII characters.

If not it causes a tricky UnicodeDecodeError, disabling djangos traceback view and spitting out a plain text error.

(Or should it be considered a bug?)

Attachments (1)

error.txt (2.2 KB) - added by zodi <zodizz@…> 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by Malcolm Tredinnick

Are you saying the UTF-8 encoded bytestring (Python str objects that are UTF-8 encoded) do not work in those places?

comment:2 in reply to:  1 Changed 12 years ago by zodi <zodizz@…>

Ok now its just getting weirder.

I tried to reproduce the issue with a cleaner project and didn't get the same error until I set the DATABASE_ENGINE just give it a working db and user without running the first syncdb. Seams to be a Mysql issue somehow because sqlite3 works just fine.

Tested with:

  • Win XP
  • Python 2.4.3
  • Django Latest svn
  • Mysql 5.0.41 and 5.0.32 on debian via ssh tunnel

And yes it's the UTF-8 encoded bytestring that seams to be causing it

    ('Your Nameåäö', ''),


    (u'Your Nameåäö', ''),


And this is the development server I'm testing with. Might just be my configuration?

Changed 12 years ago by zodi <zodizz@…>

Attachment: error.txt added


comment:3 Changed 12 years ago by zodi

Component: runserver
Owner: changed from Jacob to Adrian Holovaty

Appears to only cause problems with the development server

And some clarification, the error is triggered when viewing a traceback view for a triggered error.

comment:4 Changed 11 years ago by Jacob

Resolution: wontfix
Status: newclosed

If you're using non-ASCII in a Python file, it needs a coding declaration like # -*- coding: utf-8 -*-. Without one, you'll get errors like this. Django can't do anything differently here; the problem hits before we get a chance to do anything about it.

Note: See TracTickets for help on using tickets.
Back to Top