Statistics not working

Bug #1207400 reported by Rüdiger Kupper
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
hamster-applet (Ubuntu)
Fix Released
Medium
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 3.8.13.4
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)

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :
Revision history for this message
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
Revision history for this message
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/overview_totals.py", line 233, in on_statistics_button_clicked
    dialogs.stats.show(self)
  File "/usr/lib/python2.7/dist-packages/hamster/configuration.py", line 106, in show
    dialog = self.get_dialog_class()(parent, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hamster/stats.py", line 115, in __init__
    self.show()
  File "/usr/lib/python2.7/dist-packages/hamster/stats.py", line 125, in show
    self.get_widget("year_box").get_children()[0].set_active(True)
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.

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

Problem persists in Saucy.

tags: added: saucy
Revision history for this message
Jan C. P. (jan-c-p) wrote :

Problem also persists in Trusty.

tags: added: trusy
Revision history for this message
Jean-Baptiste (jean-baptiste-lab) wrote :

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

/usr/lib/python2.7/dist-packages/hamster/stats.py

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...

Cheers,

JB

Revision history for this message
Sebastian Bator (eremit7) wrote :
affects: hamster-indicator (Ubuntu) → hamster-applet (Ubuntu)
Revision history for this message
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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Sebastian Bator (eremit7) wrote :

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

Regards

Sebastian

Changed in hamster-applet (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
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)
Revision history for this message
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
Revision history for this message
Sebastian Bator (eremit7) wrote :

Good, still in time for vivid.

Thanks

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in ubuntu:
status: New → Confirmed
Mathew Hodson (mhodson)
affects: hamster-indicator (Debian) → ubuntu
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.