Raised TypeError in resultdump
Created by: juga0
Running sbws
09691a0f with python 3.5.3 in Tor network got the following:
[2018-06-23 14:08:33,325] [sbws.util.filelock] [DEBUG] Releasing lock /path/.sbws_tor_35/datadir/.lockfile
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File " /path/simple-bw-scanner/sbws/lib/resultdump.py", line 478, in enter
self.fresh_days, self.datadir)
File " /path/simple-bw-scanner/sbws/lib/resultdump.py", line 106, in load_recent_results_in_datadir
fname, success_only=success_only)
File " /path/simple-bw-scanner/sbws/lib/resultdump.py", line 47, in load_result_file
r = Result.from_dict(json.loads(line.strip()))
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 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 502 (char 501)
Traceback (most recent call last):
File " /path/.virtualenvs/simplebwscanner3/bin/sbws", line 11, in <module>
load_entry_point('sbws', 'console_scripts', 'sbws')()
File " /path/simple-bw-scanner/sbws/sbws.py", line 51, in main
exit(comm['f'](*comm['a'], **comm['kw']))
File " /path/simple-bw-scanner/sbws/core/scanner.py", line 402, in main
run_speedtest(args, conf)
File " /path/simple-bw-scanner/sbws/core/scanner.py", line 362, in run_speedtest
for target in rp.best_priority():
File " /path/simple-bw-scanner/sbws/lib/relayprioritizer.py", line 55, in best_priority
results = rd.results_for_relay(relay)
File " /path/simple-bw-scanner/sbws/lib/resultdump.py", line 503, in results_for_relay
if fp not in self.data:
TypeError: argument of type 'NoneType' is not iterable
i've not investitgated what caused it, but it seems we should check that self.data is not None.
I think this has to be in milestone 1, even if it seems non-ending...