Message posté par : SIG44 (y.amel05(a)hotmail.fr)
----------------------------------------
Bonjour a tous, je rencontre une problématique quand je lance mon automatisation, et
l'erreur qui m'est renvoyée est incompréhensible..
Si une âme charitable pouvait m'aider ce serai adorable... Merci d'avance
Voici mon code :
import requests
import json
overpass_url = "http://overpass-api.de/api/interpreter"
overpass_query = """
[out:json][timeout:25];
{{geocodeArea:ille-et-vilaine}}->.searchArea;
(
node["emergency"="yes"](area.searchArea);
way["emergency"="yes"](area.searchArea);
relation["emergency"="yes"](area.searchArea);
node["emergency"="fire_hydrant"](area.searchArea);
way["emergency"="fire_hydrant"](area.searchArea);
relation["emergency"="fire_hydrant"](area.searchArea);
);
out geom;
"""
response = requests.get(overpass_url,
params={'data': overpass_query})
data = response.json()
et mon erreur en sortie :
Traceback (most recent call last):
File "C:/Users/easypx/osm.py", line 75, in
data = response.json()
File
"C:UserseasypxAppDataLocalPackagesPythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0LocalCachelocal-packagesPython38site-packagesrequestsmodels.py",
line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:Program
FilesWindowsAppsPythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0libjson__init__.py",
line 357, in loads
return _default_decoder.decode(s)
File "C:Program
FilesWindowsAppsPythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0libjsondecoder.py",
line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:Program
FilesWindowsAppsPythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0libjsondecoder.py",
line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
----------------------------------------
Le message est situé
https://georezo.net/forum/viewtopic.php?pid=341872#p341872
Pour y répondre : geomatique(a)ml.georezo.net ou reply de votre messagerie
Pour vous désabonner connectez-vous sur le forum puis Profil / Abonnement
--
Association GeoRezo - le portail géomatique
https://georezo.net