Project

General

Profile

Development #61254

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

Added by Sentry Io over 1 year ago. Updated over 1 year ago.

Status:
Fermé
Priority:
Normal
Target version:
-
Start date:
31 January 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No

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

Files

Associated revisions

Revision 7472aba9 (diff)
Added by Benjamin Dauvergne over 1 year ago

gdc: raise APIError on unloadable content (#61254)

History

#1

Updated by Lauréline Guérin over 1 year ago

  • Project changed from Suivi des traces to Passerelle
#2

Updated by Benjamin Dauvergne over 1 year ago

  • Assignee set to Benjamin Dauvergne
#3

Updated by Benjamin Dauvergne over 1 year ago

#4

Updated by Benjamin Dauvergne over 1 year ago

  • Tags set to relecture-facile
#5

Updated by Nicolas Roche over 1 year ago

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

Updated by Nicolas Roche over 1 year ago

  • Status changed from Solution proposée to Solution validée
#9

Updated by Benjamin Dauvergne over 1 year ago

  • Status changed from Solution validée to 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

Updated by Transition automatique over 1 year ago

  • Status changed from Résolu (à déployer) to Solution déployée
#11

Updated by Transition automatique about 1 year ago

Automatic expiration

Also available in: Atom PDF