zefanja/aqi

Script fails after 15 measures

Closed this issue · 1 comments

After latest update of my RPI Zero W when the scripts runs I get error:

Traceback (most recent call last):
  File "./aqi.py", line 127, in <module>
    data = json.load(json_data)
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I am not specialist but I assume that this is something about encoding but don't know how to resolve this.

Resolved by executing this script with sudo via crontab.