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

gping crash when latency is 0 ms #39

Closed
SlimG opened this issue Jul 26, 2017 · 1 comment
Closed

gping crash when latency is 0 ms #39

SlimG opened this issue Jul 26, 2017 · 1 comment

Comments

@SlimG
Copy link

SlimG commented Jul 26, 2017

When I try to ping a local address, I sometimes get 0 ms, and thus gping crashes with the following errormessage:

robert@ubuntu:~$ gping 192.168.0.2
Traceback (most recent call last):
  File "/home/robert/.local/bin/gping", line 11, in <module>
    sys.exit(run())
  File "/home/robert/.local/lib/python3.5/site-packages/gping/pinger.py", line 305, in run
    _run()
  File "/home/robert/.local/lib/python3.5/site-packages/gping/pinger.py", line 331, in _run
    plotted = plot(width, height, buff, host)
  File "/home/robert/.local/lib/python3.5/site-packages/gping/pinger.py", line 149, in plot
    yellow_zone_idx = round(max_scaled * (100 / max_ping))
ZeroDivisionError: division by zero

I restart gping a few times until the first echo response takes 1 or more ms, then gping starts and works as expected.

@orf
Copy link
Owner

orf commented Aug 3, 2017

Hi, this should be fixed in a new release I just pushed. Please update! 👍

@orf orf closed this as completed Aug 3, 2017
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