Project

General

Profile

Bug #71255

feed, Object of type SAXParseException is not JSON serializable

Added by Frédéric Péters 3 months ago. Updated 3 months ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
12 November 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

Connecteur "fil RSS" branché sur une URL qui ne donne plus un fil RSS mais une redirection, ça finit ainsi

File "/usr/lib/python3/dist-packages/passerelle/utils/jsonresponse.py" in api
  134.             return self.render_data(req, data, status)

File "/usr/lib/python3/dist-packages/passerelle/utils/jsonresponse.py" in render_data
  110.         plain = json.dumps(data, **kwargs)

File "/usr/lib/python3.9/json/__init__.py" in dumps
  234.     return cls(

File "/usr/lib/python3.9/json/encoder.py" in encode
  199.         chunks = self.iterencode(o, _one_shot=True)

File "/usr/lib/python3.9/json/encoder.py" in iterencode
  257.         return _iterencode(o, 0)

File "/usr/lib/python3/dist-packages/passerelle/utils/jsonresponse.py" in default
  43.         return super().default(o)

File "/usr/lib/python3/dist-packages/django/core/serializers/json.py" in default
  104.             return super().default(o)

File "/usr/lib/python3.9/json/encoder.py" in default
  179.         raise TypeError(f'Object of type {o.__class__.__name__} '

Exception Type: TypeError at /feeds/toulousefr-rss/json
Exception Value: Object of type SAXParseException is not JSON serializable

https://sentry.entrouvert.org/entrouvert/publik/issues/61328/ (qui est mal assimilée avec une autre).

Also available in: Atom PDF