fix suggestion.
Closed this issue · 1 comments
albcunha commented
When using the following script:
from pyflit import flit
url = "my_url.com"
segment_number = 4
headers = {'User-Agent': 'Mozilla/5.0 '
'(Macintosh; Intel Mac OS X 10_9_4) '
'AppleWebKit/537.77.4 (KHTML, like Gecko) '
'Version/7.0.5 Safari/537.77.4'}
opener = flit.get_opener(headers=headers)
flit.flit_segments(url, segment_number,opener)
It returns the following error:
C:\Anaconda3\lib\site-packages\pyflit\utils.py in progressbar(total_volume, completed_volume, progress)
97 already * '█',
98 head * '▎',
---> 99 (left - head) * ' ',
100 total_volume / float(1024 * 1024),
101 progress)TypeError: can't multiply sequence by non-int of type 'float'
The error can be fixed by the following line:
99 int(left - head) * ' ',