Bug #39302
géoloc adresse, TypeError: the JSON object must be str, not 'bytes'
Début:
27 janvier 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'TypeError'>', value = 'the JSON object must be str, not 'bytes'' Stack trace (most recent call first): File "/usr/lib/python3.5/json/__init__.py", line 312, in loads 310 if not isinstance(s, str): 311 raise TypeError('the JSON object must be str, not {!r}'.format( > 312 s.__class__.__name__)) 313 if s.startswith(u'\ufeff'): 314 raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)", locals: cls = None encoding = None kw = {} object_hook = None object_pairs_hook = None parse_constant = None parse_float = None parse_int = None s = b'[{"place_id":54987896,"licence":"Data \xc2\xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":33062117,"boundingbox":["45.7814444","45.7838899","4.7550251","4.7642498"],"lat":"45.7823052","lon":"4.7593066","display_name":"Chemin de Charbonni\xc3\xa8res, \xc3\x89cully, Lyon, M\xc3\xa9tropole de Lyon, Circonscription d\xc3\xa9partementale du Rh\xc3\xb4ne, Auvergne-Rh\xc3\xb4ne-Alpes, France m\xc3\xa9tropolitaine, 69130, France","class":"highway","type":"tertiary","importance":0.5},{"place_id":99281530,"licence":"Data \xc2\xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":375208349,"boundingbox":["45.781343","45.7828006","4.7642837","4.7650025"],"lat":"45.7820356","lon":"4.7646615","display_name":"Chemin de Charbonni\xc3\xa8res, \xc3\x89cully, Lyon, M\xc3\xa9tropole de Lyon, Circonscription d\xc3\xa9partementale du Rh\xc3\xb4ne, Auvergne-Rh\xc3\xb4ne-Alpes, France m\xc3\xa9tropolitaine, 69130, France","class":"highway","type":"residential","importance":0.5},{"place_id":55294236,"licence":"Data \xc2\xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright","osm_type":"way","osm_id":33720982,"boundingbox":["45.7835152","45.7835539","4.7547415","4.7550251"],"lat":"45.7835539","lon":"4.7547415","display_name":"Chemin de Charbonni\xc3\xa8res, Charbonni\xc3\xa8res-les-Bains, Lyon, M\xc3\xa9tropole de Lyon, Circonscription d\xc3\xa9partementale du Rh\xc3\xb4ne, Auvergne-Rh\xc3\xb4ne-Alpes, France m\xc3\xa9tropolitaine, 69260, France","class":"highway","type":"tertiary","importance":0.5}]' File "/usr/lib/python3/dist-packages/wcs/wf/geolocate.py", line 138, in geolocate_address_string 136 except ValueError: 137 get_logger().error('non-JSON response from geocoding service') > 138 return 139 if len(data) == 0: 140 get_logger().info('error finding location')
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-workflows-handle-bytes-returned-from-geolocation-ser.patch 0001-workflows-handle-bytes-returned-from-geolocation-ser.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Serghei Mihai il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
- Assigné à mis à Frédéric Péters
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 4f71e764467219bff316d7620859bdb857ac3fa0 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Jan 27 15:36:54 2020 +0100 workflows: handle bytes returned from geolocation service (#39302)
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
workflows: handle bytes returned from geolocation service (#39302)