Bug #41908
OverflowError: cannot convert float infinity to integer
Début:
21 avril 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/1580/
KeyError: 'inf' File "django/template/smartif.py", line 175, in translate_token op = OPERATORS[token] OverflowError: cannot convert float infinity to integer (13 additional frame(s) were not displayed) ... File "django/template/smartif.py", line 177, in translate_token return self.create_var(token) File "django/template/defaulttags.py", line 903, in create_var return TemplateLiteral(self.template_parser.compile_filter(value), value) File "django/template/base.py", line 600, in compile_filter return FilterExpression(token, self) File "django/template/base.py", line 685, in __init__ var_obj = Variable(var) File "django/template/base.py", line 819, in __init__ self.literal = int(self.literal) Internal Server Error: /api/validate-condition
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Assigné à mis à Frédéric Péters
"Problématique de handicap ou de santé" + inf
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-misc-catch-OverflowError-that-can-be-raised-by-djang.patch 0001-misc-catch-OverflowError-that-can-be-raised-by-djang.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
C'est corrigé en Django 2.2, mais voici quand même.
Mis à jour par Serghei Mihai il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit db7bc6dd17a23fbd54f75fdd46f948ff9564a4e8 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Tue Apr 21 11:00:25 2020 +0200 misc: catch OverflowError that can be raised by django template (#41908)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
misc: catch OverflowError that can be raised by django template (#41908)