Bug #72572
esabora, AttributeError: module 'requests' has no attribute 'JSONDecodeError'
Début:
17 décembre 2022
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Non
Planning:
Non
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/98670/
JSONDecodeError: Expecting value: line 1 column 1 (char 0) File "passerelle/apps/esabora/models.py", line 87, in post data = response.json() File "requests/models.py", line 900, in json return complexjson.loads(self.text, **kwargs) File "__init__.py", line 346, in loads return _default_decoder.decode(s) File "json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None AttributeError: module 'requests' has no attribute 'JSONDecodeError' File "passerelle/utils/jsonresponse.py", line 128, in api resp = f(*args, **kwargs) File "passerelle/views.py", line 551, in perform result = self.endpoint(request, **params) File "passerelle/apps/esabora/models.py", line 151, in do_treatment data = self.post(f'{endpoint}/', payload, params={'task': 'doTreatment'}) File "passerelle/apps/esabora/models.py", line 88, in post except requests.JSONDecodeError as e: Error occurred while processing request
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a plus d'un an
- Projet changé de Suivi des traces à Passerelle
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de Nouveau à Solution proposée
- Assigné à mis à Frédéric Péters
Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/passerelle/pulls/12
- Titre : esabora: fix catching of json errors (#72572)
- Modifications : https://gitea.entrouvert.org/entrouvert/passerelle/pulls/12/files
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de Solution proposée à Solution validée
Agate Berriot (aberriot) a approuvé une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/passerelle/pulls/12
- Commentaire :
Oupsi, merci !
Mis à jour par Robot Gitea il y a plus d'un an
- Statut changé de Solution validée à Résolu (à déployer)
Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :
- URL : https://gitea.entrouvert.org/entrouvert/passerelle/pulls/12
- Titre : esabora: fix catching of json errors (#72572)
- Modifications : https://gitea.entrouvert.org/entrouvert/passerelle/pulls/12/files
Mis à jour par Transition automatique il y a plus d'un an
- Statut changé de Résolu (à déployer) à Solution déployée
esabora: fix catching of json errors (#72572)