Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix suggestion. #2

Closed
albcunha opened this issue May 28, 2016 · 1 comment
Closed

fix suggestion. #2

albcunha opened this issue May 28, 2016 · 1 comment

Comments

@albcunha
Copy link

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) * ' ',

@galeo galeo closed this as completed in 7a159ec May 29, 2016
@galeo
Copy link
Owner

galeo commented May 29, 2016

@cunhaal Thank you for the catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants