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

division by zero #29

Closed
quite opened this issue Jun 27, 2017 · 1 comment
Closed

division by zero #29

quite opened this issue Jun 27, 2017 · 1 comment

Comments

@quite
Copy link

quite commented Jun 27, 2017

I keep getting division by zero; yes I have various torrents that haven't started, and so.

Traceback (most recent call last):
  File "/usr/bin/stig", line 11, in <module>
    load_entry_point('stig==0.7.3a0', 'console_scripts', 'stig')()
  File "/usr/lib/python3.6/site-packages/stig/__init__.py", line 17, in run
    main.run()
  File "/usr/lib/python3.6/site-packages/stig/main.py", line 119, in run
    if not tui.run(run_commands):
  File "/usr/lib/python3.6/site-packages/stig/tui/main.py", line 212, in run
    urwidloop.run()
  File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run
    self._run()
  File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 376, in _run
    self.event_loop.run()
  File "/usr/lib/python3.6/site-packages/stig/tui/urwidpatches.py", line 56, in run
    raise self._exc_info
  File "/usr/lib/python3.6/asyncio/events.py", line 127, in _run
    self._callback(*self._args)
  File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 1289, in faux_idle_callback
    callback()
  File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 564, in entering_idle
    self.draw_screen()
  File "/usr/lib/python3.6/site-packages/urwid/main_loop.py", line 578, in draw_screen
    canvas = self._topmost_widget.render(self.screen_size, focus=True)
  File "/usr/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
    canv = fn(self, size, focus=focus)
  File "/usr/lib/python3.6/site-packages/urwid/widget.py", line 1750, in render
    canv = get_delegate(self).render(size, focus=focus)
  File "/usr/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
    canv = fn(self, size, focus=focus)
  File "/usr/lib/python3.6/site-packages/urwid/container.py", line 1526, in render
    canv = w.render((maxcol, rows), focus=focus and item_focus)
  File "/usr/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
    canv = fn(self, size, focus=focus)
  File "/usr/lib/python3.6/site-packages/stig/tui/tabs.py", line 129, in render
    canvas = current_widget.render(size_content, focus)
  File "/usr/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
    canv = fn(self, size, focus=focus)
  File "/usr/lib/python3.6/site-packages/stig/tui/torrent/tlist.py", line 116, in render
    self._update_listitems()
  File "/usr/lib/python3.6/site-packages/stig/tui/torrent/tlist.py", line 149, in _update_listitems
    walker.append(widgetcls(tdict[tid], row))
  File "/usr/lib/python3.6/site-packages/stig/tui/torrent/tlist.py", line 34, in __init__
    self.update(torrent)
  File "/usr/lib/python3.6/site-packages/stig/tui/torrent/tlist.py", line 41, in update
    widget.update(torrent)
  File "/usr/lib/python3.6/site-packages/stig/tui/torrent/__init__.py", line 88, in update
    self.data.update(data)
  File "/usr/lib/python3.6/site-packages/stig/client/aiotransmission/torrent.py", line 388, in __getitem__
    value = _MODIFY[key](raw)
  File "/usr/lib/python3.6/site-packages/stig/client/aiotransmission/torrent.py", line 324, in <lambda>
    '%uploaded'         : lambda raw: raw['uploadedEver'] / raw['totalSize'] * 100,
ZeroDivisionError: division by zero
@rndusr
Copy link
Owner

rndusr commented Jun 27, 2017

Should be fixed by the latest commit in the dev branch.

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