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

Issue #502 resolved
Waldo G 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/", 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/", 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. Waldo G 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. Marcin Kuzminski repo owner

    fixed in 4548912f48c8. btw you cannot set unlimited changes, maximum is 100, you would probably blow up the server if setting unlimited on repo with 30k changesets

  3. Waldo G 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.

  4. Marcin Kuzminski repo owner

    It's persistent in user session, delete content of /data/session to clear that out, the path to /data/session is in the .ini file.

  5. Log in to comment