Projet

Général

Profil

Bug #14292

UnicodeEncodeError when exporting list of roles to HTML

Ajouté par Frédéric Péters il y a plus de 7 ans. Mis à jour il y a environ 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
-
Début:
13 décembre 2016
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Non
Planning:

Description

Internal Server Error: /manage/roles/export/html/
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 65, in dispatch
    return super(PermissionMixin, self).dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 124, in dispatch
    return super(SearchFormMixin, self).dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 257, in get
    content = getattr(self.get_dataset(), export_format)
  File "/usr/lib/python2.7/dist-packages/tablib/formats/_html.py", line 44, in export_set
    stream.writelines(str(page))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 438: ordinal not in range(128)

(maybe it's caused by the tablib version, I couldn't reproduce locally with a quick test). (this happened on https://connexion.nancy.fr/manage/roles/, python-tablib 0.9.11-2 from jessie)


Demandes liées

Lié à Authentic 2 - Bug #19710: UnicodeEncodeError when exporting list of users to HTMLFermé27 octobre 2017

Actions
Dupliqué par Authentic 2 - Bug #19140: Problème sur l'export HTML de rôles dont le nom comporte des accents (UnicodeEncodeError at /manage/roles/export/html/)Rejeté02 octobre 2017

Actions

Historique

#2

Mis à jour par Benjamin Dauvergne il y a presque 7 ans

Yep c'est du à la version de tablib https://github.com/kennethreitz/tablib/commit/21c11b9911a0141602444265a34219c16c152067, il faut la 0.10.0 au moins.

#3

Mis à jour par Benjamin Dauvergne il y a presque 7 ans

Ticket pour repackager tablib: https://dev.entrouvert.org/issues/16593 .

#5

Mis à jour par Frédéric Péters il y a plus de 6 ans

  • Dupliqué par Bug #19140: Problème sur l'export HTML de rôles dont le nom comporte des accents (UnicodeEncodeError at /manage/roles/export/html/) ajouté
#6

Mis à jour par Mikaël Ates il y a plus de 6 ans

  • Lié à Bug #19710: UnicodeEncodeError when exporting list of users to HTML ajouté
#7

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

Bon je pense que je vais juste virer les exports tablib n'ira jamais, je vais juste mettre un export ODS basé sur le code dans w.c.s.

#8

Mis à jour par Mikaël Ates il y a environ 6 ans

  • Statut changé de Nouveau à Fermé

Déprécié via #21197.

Formats disponibles : Atom PDF