Opened 2 years ago

Closed 2 years ago

Last modified 20 months 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.x-final
Component: Core Tor/sbws Version:
Severity: Normal Keywords: sbws-1.0-must-closed-moved-20181128
Cc: pastly@…, teor Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


pastly@aaseae:~/run/sbws-liveclient-http$ sbws-generate 
2018-07-06 12:59:52,592 DEBUG MainThread - is_initted - /home/pastly/run/sbws-liveclient-http seems initialized.
2018-07-06 12:59:52,607 DEBUG MainThread - __enter__ - Going to lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
2018-07-06 12:59:52,607 DEBUG MainThread - __enter__ - Received lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
2018-07-06 12:59:52,797 DEBUG MainThread - __exit__ - Releasing lock /home/pastly/run/sbws-liveclient-http/datadir/.lockfile
2018-07-06 12:59:52,798 DEBUG MainThread - 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 - 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/", line 51, in main
    exit(comm['f'](*comm['a'], **comm['kw']))
  File "/home/pastly/src/simple-bw-scanner/sbws/core/", line 58, in main
    bw_file = V3BWFile.from_arg_results(args, conf, results)
  File "/home/pastly/src/simple-bw-scanner/sbws/lib/", 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/", line 403, in <listcomp>
    bw_lines = [V3BWLine.from_results(results[fp]) for fp in results]
  File "/home/pastly/src/simple-bw-scanner/sbws/lib/", line 357, in from_results
    bw = cls.bw_from_results(success_results)
  File "/home/pastly/src/simple-bw-scanner/sbws/lib/", line 324, in bw_from_results
    r.relay_average_bandwidth for r in results
  File "/usr/lib/python3.5/", line 353, in median
    raise StatisticsError("no median for empty data")
statistics.StatisticsError: no median for empty data

Child Tickets

Change History (6)

comment:1 Changed 2 years ago by pastly

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

comment:2 Changed 2 years ago by juga

Owner: set to juga
Status: newassigned

comment:3 Changed 2 years ago by juga

Status: assignedneeds_review

Fix in my branch

comment:4 Changed 2 years ago by teor

Cc: teor added; teor@… removed

Shorten useful CCs

comment:5 Changed 2 years ago by pastly

Resolution: fixed
Status: needs_reviewclosed

comment:6 Changed 20 months ago by teor

Keywords: sbws-1.0-must-closed-moved-20181128 added
Milestone: sbws 1.0 (MVP must)sbws: 1.0.x-final

Move all closed sbws 1.0 must tickets to sbws 1.0.x-final

Note: See TracTickets for help on using tickets.