Opened 2 weeks ago

Closed 11 days ago

#26666 closed defect (fixed)

Bad median on empty list in sbws generate

Reported by: pastly Owned by: juga
Priority: Medium Milestone: sbws 1.0 (MVP must)
Component: Core Tor/sbws Version:
Severity: Normal Keywords:
Cc: pastly@…, teor Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

pastly@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

Child Tickets

Change History (5)

comment:1 Changed 2 weeks ago by pastly

Keywords: sbws-1.0must removed
Milestone: sbws 1.0 (MVP must)

comment:2 Changed 2 weeks ago by juga

Owner: set to juga
Status: newassigned

comment:3 Changed 2 weeks ago by juga

Status: assignedneeds_review

Fix in my branch

comment:4 Changed 2 weeks ago by teor

Cc: teor added; teor@… removed

Shorten useful CCs

comment:5 Changed 11 days ago by pastly

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.