1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #502 resolved

Attempting to show all changes in repo changelog causes "float division by zero"

gwaldo
created an issue

While in project repo changes, I attempted to change the quantity of displayed changes to ALL by changing the default of 20 to "0". This sent me back to the main page with the message "float division by zero", and any attempt to go back into that or any other project's changelog returns to the main page with the same message.

The relevant log entries appear to be:

{{{

!text

2012-07-18 08:58:13.889 INFO [rhodecode.lib.auth] user default is authenticated and granted access to ChangelogController:before 2012-07-18 08:58:13.963 ERROR [rhodecode.controllers.changelog] Traceback (most recent call last): File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/controllers/changelog.py", line 83, in index items_per_page=c.size, branch=branch_name) File "/var/www/rhodecode-venv/local/lib/python2.7/site-packages/rhodecode/lib/helpers.py", line 665, in init self.items_per_page)) ZeroDivisionError: float division by zero }}}

Restarting the rhodecode daemon does not resolve the float divide by zero behaviour. Then I looked in my production.ini for an apparent setting, and finding none stopped rhodecode and copied my rhodecode.db sqlite file out. I spent a couple minutes browsing it, but did not see anything relevant to the changelog view to set back to a non-zero number.

Comments (6)

  1. gwaldo reporter

    I was able to successfully push to my repo after a restart of the rhodecode daemon, but the changelog feature is still broken.

  2. gwaldo reporter

    Thank you very much, Marcin. Both for Rhodecode itself and the quick turnaround on this issue.

    I have almost no experience with Python (but can code in others), but I took a quick look through this def, and I don't see to where the size value is persisted.

  3. Log in to comment