Projet

Général

Profil

Bug #41908

OverflowError: cannot convert float infinity to integer

Ajouté par Sentry Io il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
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

Révision db7bc6dd (diff)
Ajouté par Frédéric Péters il y a environ 4 ans

misc: catch OverflowError that can be raised by django template (#41908)

Historique

#1

Mis à jour par Lauréline Guérin il y a environ 4 ans

  • Projet changé de Suivi des traces à w.c.s.
#2

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

#3

Mis à jour par Frédéric Péters il y a environ 4 ans

C'est corrigé en Django 2.2, mais voici quand même.

#4

Mis à jour par Serghei Mihai il y a environ 4 ans

  • Statut changé de Solution proposée à Solution validée
#5

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)
#6

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

Formats disponibles : Atom PDF