#30303: Error handler page generating unicode decode error.
---------------------------------+--------------------------------------
Reporter: Kevin Golding | Owner: (none)
Type: Bug | Status: closed
Component: Error reporting | Version: 2.2
Severity: Normal | Resolution: needsinfo
Keywords: wsgi unicode | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by Kevin Golding):
I did some more digging around based on what you said about the call to
'locale.getpreferredencoding()' and it turns it is environmental as you
suggested.
The short answer is that when running from Apache the locale is not set to
anything and seems to default to ascii. The author of mod_wsgi has written
a pretty good explanation of what is going on and how to fix it here:
http://blog.dscpl.com.au/2014/09/setting-lang-and-lcall-when-using.html
(tl;dr run in daemon mode and set lang and locale in the WSGIDaemonProcess
configuration)
I still don't understand why this problem doesn't occur with Python 2
and/or Django 2.1 or earlier.
--
Ticket URL: <https://code.djangoproject.com/ticket/30303#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/074.6adb03a72b097a3fd2b9744b0a56e8d9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.