Development #30091
Trace export utilisateur csv - problème de version Tablib
Début:
25 janvier 2019
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
En prod :
AttributeError at /manage/users/export/csv/ 'Dataset' object has no attribute 'export'
Fichiers
Révisions associées
Historique
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
- Fichier 0001-user-export-csv-compatiblity-with-tablib-0.11-30091.patch 0001-user-export-csv-compatiblity-with-tablib-0.11-30091.patch ajouté
- Statut changé de Rejeté à Solution proposée
- Patch proposed changé de Non à Oui
La trace complète et le patch.
Internal Server Error: /manage/users/export/csv/ Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 126, in dispatch return super(PermissionMixin, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 178, in dispatch return super(SearchFormMixin, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 364, in get content = getattr(self.get_dataset(), export_format) File "/usr/lib/python2.7/dist-packages/authentic2/manager/user_views.py", line 345, in csv return self._dataset.export('csv') AttributeError: 'Dataset' object has no attribute 'export'
Mis à jour par Frédéric Péters il y a plus de 5 ans
Je mettrais le code à l'envers, pour avoir dans le if ...
le code qui pourra un jour être supprimé, et un commentaire pour dire "cette branche est là pour gérer tablib < x.y".
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
Et donc testé local avec tablib 0.9.11, et 0.12.1, ça m'a l'air ok.
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
Déployé sur ancien SAAS uniquement, testé sur Fontenay, exception différente :
Internal Server Error: /manage/users/export/csv/ Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 126, in dispatch return super(PermissionMixin, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 178, in dispatch return super(SearchFormMixin, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 89, in dispatch return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/authentic2/manager/views.py", line 364, in get content = getattr(self.get_dataset(), export_format) File "/usr/lib/python2.7/dist-packages/authentic2/manager/user_views.py", line 361, in get_dataset user_attrs[av['object_id']][at_mapping[av['attribute_id']].name] = av['content'] KeyError: 5
Mis à jour par Emmanuel Cazenave il y a plus de 5 ans
- Sujet changé de Trace export utilisateur csv à Trace export utilisateur csv - problème de version Tablib
Mis à jour par Serghei Mihai il y a environ 5 ans
- Statut changé de Solution proposée à Solution déployée
- Assigné à mis à Emmanuel Cazenave
Mis à jour par Emmanuel Cazenave il y a environ 5 ans
- Statut changé de Solution déployée à Résolu (à déployer)
commit c7f80a61d273c23dfc5d82c803f6ad55a23df4ca Author: Emmanuel Cazenave <ecazenave@entrouvert.com> Date: Fri Jan 25 11:42:49 2019 +0100 user export csv compatiblity with tablib < 0.11 (#30091)
Mis à jour par Frédéric Péters il y a environ 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
user export csv compatiblity with tablib < 0.11 (#30091)