[Python] Récupérer Alertes Météo France

Vous avez créé un script LUA dont vous êtes fier, un .sh génial, un programme Python hors du commun, un Tuto, c'est ici que vous pouvez les partager.
JC38
Messages : 286
Inscription : 29 déc. 2014, 20:47
Localisation : Lyon

Re: Récupérer Alertes Météo France

Message par JC38 »

Bonsoir,

Le script est-il toujours fonctionnel ?
Pour moi, il plante depuis quelques jours :

Code : Tout sélectionner

Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/python/recupvigi.py", line 91, in <module>
    vigijson=r.json()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 792, in json
    return json.loads(self.content.decode(encoding), **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/__init__.py", line 505, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
  File "/usr/local/lib/python2.7/dist-packages/simplejson/scanner.py", line 127, in scan_once
    return _scan_once(string, idx)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/scanner.py", line 118, in _scan_once
    raise JSONDecodeError(errmsg, string, idx)
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Raspberry Pi3 sous Jessie 8.3 + Domoticz latest beta + RFXComm Usb + Aeon Labs Z-Stick + Weather Underground
Windows Server 2012 R2 + Domoticz Windows (latest) + Open Hardware Monitor
Clients : ImperiHome avec Mdah / Domoticz for Android
hobbe
Messages : 111
Inscription : 15 déc. 2014, 15:33

Re: Récupérer Alertes Météo France

Message par hobbe »

JC38 a écrit :Bonsoir,

Le script est-il toujours fonctionnel ?
Pour moi, il plante depuis quelques jours :
Domogeek/Guiguiabloc vient de fermer son site proposant l'API.
Voir son post : http://blog.guiguiabloc.fr/index.php/20 ... ap-de-fin/

Les API renvoient systématiquement : API CLOSED.
Je suppose que le script Python ne s'y attend pas et plante.
Les scripts LUA ont une valeur par défaut qui permet d'afficher l'icône grise avec le texte API CLOSED ;-)
Répondre