Projet

Général

Profil

Development #61254

ValueError: failed expectation, expected b':' got b'r'

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

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
31 janvier 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/54444/

ValueError: failed expectation, expected b':' got b'r'
(10 additional frame(s) were not displayed)
...
  File "passerelle/apps/gdc/models.py", line 51, in phpserialize_loads
    return deep_bytes2str(phpserialize.loads(s.encode('utf-8')))
  File "phpserialize.py", line 522, in loads
    object_hook, array_hook)
  File "phpserialize.py", line 512, in load
    return _unserialize()
  File "phpserialize.py", line 496, in _unserialize
    _expect(b':')
  File "phpserialize.py", line 444, in _expect
    raise ValueError('failed expectation, expected %r got %r' % (e, v))

Fichiers

Révisions associées

Révision 7472aba9 (diff)
Ajouté par Benjamin Dauvergne il y a environ 2 ans

gdc: raise APIError on unloadable content (#61254)

Historique

#1

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

  • Projet changé de Suivi des traces à Passerelle
#2

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

  • Assigné à mis à Benjamin Dauvergne
#3

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

#4

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

  • Tags mis à relecture-facile
#5

Mis à jour par Nicolas Roche il y a environ 2 ans

Peut-être ajouter un test ?

>>> s = 'plop'
>>> truncated = s[:128] if isinstance(s, str) else s
>>> f'Could not deserialize GDC response {truncated:r}'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'r' for object of type 'str'

#7

Mis à jour par Nicolas Roche il y a environ 2 ans

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

Mis à jour par Benjamin Dauvergne il y a environ 2 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 7472aba9c63b0482d88a8826de2cd0878f766f44
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Mon Jan 31 12:20:40 2022 +0100

    gdc: raise APIError on unloadable content (#61254)
#10

Mis à jour par Transition automatique il y a environ 2 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#11

Mis à jour par Transition automatique il y a environ 2 ans

Automatic expiration

Formats disponibles : Atom PDF