speedtest-cli icon indicating copy to clipboard operation
speedtest-cli copied to clipboard

TypeError fix for unexpected NoneType in summation of list

Open almqv opened this issue 4 years ago • 2 comments

Traceback (most recent call last):
  File "/usr/bin/speedtest", line 11, in <module>
    load_entry_point('speedtest-cli==2.0.2', 'console_scripts', 'speedtest')()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1887, in main
    shell()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1856, in shell
    speedtest.upload(callback=callback, pre_allocate=args.pre_allocate)
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1577, in upload
    self.results.bytes_sent = sum(finished)
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

Caused when the "finished" list is summed with the function "sum" near line 1678.

almqv avatar Nov 30 '21 08:11 almqv

I also need help with this.

ismail424 avatar Nov 30 '21 09:11 ismail424

Is this problem still exist in the current version? Have the changes made fixed the problem?

cruxifixus avatar May 01 '22 13:05 cruxifixus