[Django] #28251: Paginator causes a UnicodeDecodeError on empty pages when language is DE or FR (and possibly others)

7 views
Skip to first unread message

Django

unread,
May 29, 2017, 3:43:51 AM5/29/17
to django-...@googlegroups.com
#28251: Paginator causes a UnicodeDecodeError on empty pages when language is DE or
FR (and possibly others)
-------------------------------------+-------------------------------------
Reporter: Paolo | Owner: nobody
Dente |
Type: Bug | Status: new
Component: | Version: 1.11
Internationalization |
Severity: Normal | Keywords: Paginator i18n
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
The new translations files from
https://github.com/django/django/commit/afe4edb4eaaad89acefa6b6d0697d6fa67387eea
cause an exception with empty pages. For instance, in French you'd get
this:
**UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30:
ordinal not in range(128)**

This is caused by
https://github.com/django/django/blob/master/django/views/generic/list.py#L74
- changing
**str(e)**
with
**unicode(e)**
fixes the problem for me.

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

Django

unread,
May 29, 2017, 7:59:25 AM5/29/17
to django-...@googlegroups.com
#28251: Paginator causes a UnicodeDecodeError on empty pages when language is DE or
FR (and possibly others)
--------------------------------------+------------------------------------
Reporter: Paolo Dente | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.11
Severity: Release blocker | Resolution:
Keywords: Paginator i18n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Simon Charette):

* severity: Normal => Release blocker
* stage: Unreviewed => Accepted


Comment:

Regression in e690eb405f09a9e58b9d95ae98991352602635d6

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

Django

unread,
May 29, 2017, 9:31:38 AM5/29/17
to django-...@googlegroups.com
#28251: MultipleObjectMixin,paginate_queryset() crashes with UnicodeDecodeError if
InvalidPage message contains non-ASCII
---------------------------------+-------------------------------------

Reporter: Paolo Dente | Owner: nobody
Type: Bug | Status: closed
Component: Generic views | Version: 1.11
Severity: Release blocker | Resolution: duplicate
Keywords: Paginator i18n | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* component: Internationalization => Generic views
* resolution: => duplicate


Comment:

Duplicate of #28204.

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

Reply all
Reply to author
Forward
0 new messages