defaultnamehere / zzzzz

Roleplay as the NSA by making creepy graphs of your friends
MIT License
1.3k stars 131 forks source link

Network loss leads to crash #4

Closed zeusk closed 8 years ago

zeusk commented 8 years ago

I checked logs, and my router was unreachable for 5 minutes but because the script crashed - I lost about a few hours of potential data. Here is the trace:

Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "fetcher.py", line 61, in make_request
    data = json.loads(raw_response)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "fetcher.py", line 176, in <module>
    f.start_request()
  File "fetcher.py", line 93, in start_request
    resp = self.make_request()
  File "fetcher.py", line 64, in make_request
    print(content)
NameError: name 'content' is not defined