Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

ZeroDivisionError with -d #202

Closed
Diaoul opened this Issue · 3 comments

2 participants

@Diaoul
Downloading to "jquery-2.1.0.min.js"
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\site-packages\httpie\downloads.py", line 354, in run
    self.sum_up()
  File "C:\Python27\lib\site-packages\httpie\downloads.py", line 424, in sum_up
    speed=humanize_bytes(actually_downloaded / time_taken),
ZeroDivisionError: float division by zero

Using HTTPie 0.8.0, requests 2.2.1, Pygments 1.6 on Python 2.7.6 Windows 7 64 bits.

@jkbrzt
Owner

Thanks for the report. Could you share the URL and the original command used?

@jkbrzt jkbrzt added the bug label
@jkbrzt jkbrzt closed this in b01906a
@jkbrzt
Owner

It should be fixed in current master now. You can install it via:

$ pip install --upgrade https://github.com/jkbr/httpie/tarball/master
@Diaoul

In my case I queried a local webserver so the download was really quick and the file really small. The file has been downloaded just fine and probably in less than 1 unit of time, hence the error.

I retried multiple times and sometimes saw that it was working just fine displaying 0.00200s or so and sometimes it failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.