ZeroDivisionError with -d #202

Diaoul opened this Issue Feb 18, 2014 · 3 comments


None yet

2 participants

Diaoul commented Feb 18, 2014
Downloading to "jquery-2.1.0.min.js"
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\", line 810, in __bootstrap_inner
  File "C:\Python27\lib\site-packages\httpie\", line 354, in run
  File "C:\Python27\lib\site-packages\httpie\", 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 commented Feb 18, 2014

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

@jkbrzt jkbrzt added the bug label Feb 18, 2014
@jkbrzt jkbrzt closed this in b01906a Feb 18, 2014
jkbrzt commented Feb 18, 2014

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

$ pip install --upgrade
Diaoul commented Feb 18, 2014

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