[Django] #28390: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/

12 views
Skip to first unread message

Django

unread,
Jul 12, 2017, 8:19:45 AM7/12/17
to django-...@googlegroups.com
#28390: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/
------------------------------------------------+------------------------
Reporter: francbartoli | Owner: nobody
Type: Bug | Status: new
Component: File uploads/storage | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
From
[https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/] the
suggested hints within "Fixing UnicodeEncodeError for file uploads" don't
overcome the issue with UnicodeEncodeError on CentOS 7.

Configuration is:

[OS]
CentOS Linux release 7.3.1611 (Core)

[Apache]
Name : httpd
Arch : x86_64
Version : 2.4.6
Release : 45.el7.centos.4

[Mod_wsgi]
Name : mod_wsgi
Arch : x86_64
Version : 3.4
Release : 12.el7_0

Setting those variables into /etc/sysconfig/httpd
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

doesn't affect the result of
import sys
sys.getdefaultencoding()
'ascii'

--
Ticket URL: <https://code.djangoproject.com/ticket/28390>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 12, 2017, 8:45:14 AM7/12/17
to django-...@googlegroups.com
#28390: https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/
-------------------------------------+-------------------------------------
Reporter: Francesco Bartoli | Owner: nobody
Type: Bug | Status: new
Component: File | Version: 1.8
uploads/storage |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Francesco Bartoli:

Old description:

> From
> [https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/]
> the suggested hints within "Fixing UnicodeEncodeError for file uploads"
> don't overcome the issue with UnicodeEncodeError on CentOS 7.
>
> Configuration is:
>
> [OS]
> CentOS Linux release 7.3.1611 (Core)
>
> [Apache]
> Name : httpd
> Arch : x86_64
> Version : 2.4.6
> Release : 45.el7.centos.4
>
> [Mod_wsgi]
> Name : mod_wsgi
> Arch : x86_64
> Version : 3.4
> Release : 12.el7_0
>
> Setting those variables into /etc/sysconfig/httpd
> export LANG="en_US.UTF-8"
> export LC_ALL="en_US.UTF-8"
>
> doesn't affect the result of
> import sys
> sys.getdefaultencoding()
> 'ascii'

New description:

From
[https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/] the
suggested hints within "Fixing UnicodeEncodeError for file uploads" don't
overcome the issue with UnicodeEncodeError on CentOS 7.

Configuration is:

[OS]
CentOS Linux release 7.3.1611 (Core)

[Apache]
Name : httpd
Arch : x86_64
Version : 2.4.6
Release : 45.el7.centos.4

[Mod_wsgi]
Name : mod_wsgi
Arch : x86_64
Version : 3.4
Release : 12.el7_0

Setting those variables into /etc/sysconfig/httpd
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

doesn't affect the result of
import sys
sys.getdefaultencoding()
'ascii'

and the traceback is

Traceback: File "/usr/lib/python2.7/site-
packages/django/core/handlers/base.py" in get_response 132. response =
wrapped_callback(request, *callback_args, **callback_kwargs) File
"/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in
_wrapped_view 22. return view_func(request, *args, **kwargs) File
"/home/geonode/geonode/geonode/layers/views.py" in layer_upload 174.
out['errors'] = str(error) Exception Type: UnicodeEncodeError at
/layers/upload Exception Value: 'ascii' codec can't encode character
u'\xe8' in position 3: ordinal not in range(128) Request information: GET:
No GET data POST: charset = u'UTF-8'

--

--
Ticket URL: <https://code.djangoproject.com/ticket/28390#comment:1>

Django

unread,
Jul 12, 2017, 10:07:09 AM7/12/17
to django-...@googlegroups.com
#28390: "Fixing UnicodeEncodeError for file uploads" instructions don't work on
CentOS 7
-----------------------------------+--------------------------------------
Reporter: Francesco Bartoli | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Tim Graham):

* status: new => closed
* component: File uploads/storage => Documentation
* resolution: => needsinfo


Old description:

> From
> [https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/]
> the suggested hints within "Fixing UnicodeEncodeError for file uploads"
> don't overcome the issue with UnicodeEncodeError on CentOS 7.
>
> Configuration is:
>
> [OS]
> CentOS Linux release 7.3.1611 (Core)
>
> [Apache]
> Name : httpd
> Arch : x86_64
> Version : 2.4.6
> Release : 45.el7.centos.4
>
> [Mod_wsgi]
> Name : mod_wsgi
> Arch : x86_64
> Version : 3.4
> Release : 12.el7_0
>
> Setting those variables into /etc/sysconfig/httpd
> export LANG="en_US.UTF-8"
> export LC_ALL="en_US.UTF-8"
>
> doesn't affect the result of
> import sys
> sys.getdefaultencoding()
> 'ascii'
>

> and the traceback is
>
> Traceback: File "/usr/lib/python2.7/site-
> packages/django/core/handlers/base.py" in get_response 132. response =
> wrapped_callback(request, *callback_args, **callback_kwargs) File
> "/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in
> _wrapped_view 22. return view_func(request, *args, **kwargs) File
> "/home/geonode/geonode/geonode/layers/views.py" in layer_upload 174.
> out['errors'] = str(error) Exception Type: UnicodeEncodeError at
> /layers/upload Exception Value: 'ascii' codec can't encode character
> u'\xe8' in position 3: ordinal not in range(128) Request information:
> GET: No GET data POST: charset = u'UTF-8'

New description:

From
[https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/modwsgi/] the
suggested hints within "Fixing UnicodeEncodeError for file uploads" don't
overcome the issue with UnicodeEncodeError on CentOS 7.

Configuration is:
{{{
[OS]
CentOS Linux release 7.3.1611 (Core)

[Apache]
Name : httpd
Arch : x86_64
Version : 2.4.6
Release : 45.el7.centos.4

[Mod_wsgi]
Name : mod_wsgi
Arch : x86_64
Version : 3.4
Release : 12.el7_0
}}}
Setting those variables into /etc/sysconfig/httpd
{{{
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
}}}
doesn't affect the result of
{{{
import sys
sys.getdefaultencoding()
'ascii'
}}}

and the traceback is
{{{
Traceback: File "/usr/lib/python2.7/site-
packages/django/core/handlers/base.py" in get_response 132. response =
wrapped_callback(request, *callback_args, **callback_kwargs) File
"/usr/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in
_wrapped_view 22. return view_func(request, *args, **kwargs) File
"/home/geonode/geonode/geonode/layers/views.py" in layer_upload 174.
out['errors'] = str(error) Exception Type: UnicodeEncodeError at
/layers/upload Exception Value: 'ascii' codec can't encode character
u'\xe8' in position 3: ordinal not in range(128) Request information: GET:
No GET data POST: charset = u'UTF-8'
}}}

--

Comment:

You'll be more likely to get help on
[wiki:TicketClosingReasons/UseSupportChannels our support channels]. If it
turns out some improvement to the Django documentation is needed, then
please reopen the ticket with details. Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/28390#comment:2>

Reply all
Reply to author
Forward
0 new messages