[tor-bugs] #26666 [Core Tor/sbws]: Bad median on empty list in sbws generate

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jul 6 11:02:27 UTC 2018


#26666: Bad median on empty list in sbws generate
-------------------------------+--------------------------
     Reporter:  pastly         |      Owner:  (none)
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Core Tor/sbws  |    Version:
     Severity:  Normal         |   Keywords:  sbws-1.0must
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+--------------------------
 {{{
 pastly at aaseae:~/run/sbws-liveclient-http$ sbws-generate
 2018-07-06 12:59:52,592 DEBUG MainThread globals.py:43 - is_initted -
 /home/pastly/run/sbws-liveclient-http seems initialized.
 2018-07-06 12:59:52,607 DEBUG MainThread filelock.py:17 - __enter__ -
 Going to lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
 2018-07-06 12:59:52,607 DEBUG MainThread filelock.py:23 - __enter__ -
 Received lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
 2018-07-06 12:59:52,797 DEBUG MainThread filelock.py:27 - __exit__ -
 Releasing lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
 2018-07-06 12:59:52,798 DEBUG MainThread resultdump.py:62 -
 load_result_file - Keeping 2990/3405 read lines from /home/pastly/run
 /sbws-liveclient-http/datadir/2018-07-06.txt
 2018-07-06 12:59:52,805 DEBUG MainThread resultdump.py:85 - trim_results -
 Keeping 2990/2990 results after removing old ones
 Traceback (most recent call last):
   File "/home/pastly/src/simple-bw-scanner/venv-editable/bin/sbws", line
 11, in <module>
     load_entry_point('sbws', 'console_scripts', 'sbws')()
   File "/home/pastly/src/simple-bw-scanner/sbws/sbws.py", line 51, in main
     exit(comm['f'](*comm['a'], **comm['kw']))
   File "/home/pastly/src/simple-bw-scanner/sbws/core/generate.py", line
 58, in main
     bw_file = V3BWFile.from_arg_results(args, conf, results)
   File "/home/pastly/src/simple-bw-scanner/sbws/lib/v3bwfile.py", line
 403, in from_arg_results
     bw_lines = [V3BWLine.from_results(results[fp]) for fp in results]
   File "/home/pastly/src/simple-bw-scanner/sbws/lib/v3bwfile.py", line
 403, in <listcomp>
     bw_lines = [V3BWLine.from_results(results[fp]) for fp in results]
   File "/home/pastly/src/simple-bw-scanner/sbws/lib/v3bwfile.py", line
 357, in from_results
     bw = cls.bw_from_results(success_results)
   File "/home/pastly/src/simple-bw-scanner/sbws/lib/v3bwfile.py", line
 324, in bw_from_results
     r.relay_average_bandwidth for r in results
   File "/usr/lib/python3.5/statistics.py", line 353, in median
     raise StatisticsError("no median for empty data")
 statistics.StatisticsError: no median for empty data
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/26666>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list