Statistics not working

Bug #1207400 reported by Rüdiger Kupper on 2013-08-01
This bug affects 6 people
Affects Status Importance Assigned to Milestone
hamster-applet (Ubuntu)
Timo Jyrinki

Bug Description

When I press "Show statistics" in the totals view, hamster displays an empty window that reads at its bottom "Text we say when there is not enough data". That's independent from the data range I select, it never shows any data.
This worked in Quantal, I can't remember trying it in Raring until now.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: hamster-indicator 0.1+037dd2e-0ubuntu2
ProcVersionSignature: Ubuntu 3.8.0-27.40-generic
Uname: Linux 3.8.0-27-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Thu Aug 1 17:15:56 2013
InstallationDate: Installed on 2013-04-12 (111 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: hamster-indicator
UpgradeStatus: Upgraded to raring on 2013-04-25 (97 days ago)

Jason Moore (moorepants) wrote :

I have 342 hours of time tracked and still get "text we say when there is not enough data" when I press the statistics button. This used to work for me on quantal too. Now it doesn't on raring.

Changed in hamster-indicator (Ubuntu):
status: New → Confirmed
Germán Bassi (germanbassi) wrote :

The same happens to me. Apparently the bug starts here

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/hamster/", line 233, in on_statistics_button_clicked
  File "/usr/lib/python2.7/dist-packages/hamster/", line 106, in show
    dialog = self.get_dialog_class()(parent, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hamster/", line 115, in __init__
  File "/usr/lib/python2.7/dist-packages/hamster/", line 125, in show
IndexError: list index out of range

For what I've seen the hbox "year_box" is empty, thus the get_children() returns an empty list.

Problem persists in Saucy.

tags: added: saucy
Jan C. P. (jan-c-p) wrote :

Problem also persists in Trusty.

tags: added: trusy

I've also been hit by this issue, I managed to get hamster statistics locally by poking in the file:


Depending on the hamster version packaged in your distro, the number of the line to change might be different, I had to change line 131 in my installation (I'm on Mint LMDE, hamster .deb version 2.91.3+git20).

Change this line (131 on my system) from:

        if not self.stat_facts or self.stat_facts[-1].start_time.year == self.stat_facts[0].start_time.year:

to the simpler version:

        if not self.stat_facts:

That did it for me. Note that I do not know if this change has any detrimental side-effects...



Sebastian Bator (eremit7) wrote :
affects: hamster-indicator (Ubuntu) → hamster-applet (Ubuntu)
Sebastian Bator (eremit7) wrote :

Made a patch out of the upstream revision.

The first test show that statistics work now. However I will test this more throughly next week.

The attachment "07-dont-break-with-only-one-year-of-stats.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Sebastian Bator (eremit7) wrote :

Patch fixes the issue and my test did not reveal any other issues. Please review and give feedback / load up.



Changed in hamster-applet (Ubuntu):
status: Confirmed → In Progress
Timo Jyrinki (timo-jyrinki) wrote :

Hi! Indeed it seems the patch fixes the issue in my quick testing, thanks a lot! Sponsoring by adding the patch to the patch series and writing a changelog entry describing your fix.

Changed in hamster-applet (Ubuntu):
assignee: nobody → Timo Jyrinki (timo-jyrinki)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hamster-applet - 2.91.3+git20120514.b9fec3e1-1ubuntu2

hamster-applet (2.91.3+git20120514.b9fec3e1-1ubuntu2) vivid; urgency=medium

  [ Sebastian Bator ]
  * debian/patches/07-dont-break-with-only-one-year-of-stats.patch:
    Fix the show statistics functionality (LP: #1207400)
 -- Timo Jyrinki <email address hidden> Tue, 07 Apr 2015 10:35:58 +0300

Changed in hamster-applet (Ubuntu):
status: In Progress → Fix Released
Sebastian Bator (eremit7) wrote :

Good, still in time for vivid.


Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: hamster-indicator (Debian) → ubuntu
Changed in ubuntu:
status: New → Confirmed
Changed in hamster-applet (Ubuntu):
importance: Undecided → Medium
no longer affects: ubuntu
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers