Bug 1074967 - [abrt] hamster-time-tracker: overview.py:385:on_add_activate:TypeError: 'Fact' object has no attribute '__getitem__'
Summary: [abrt] hamster-time-tracker: overview.py:385:on_add_activate:TypeError: 'Fact...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hamster-time-tracker
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:d5023d4d208e79974e5420ceb03...
: 1044531 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-11 09:58 UTC by Soeren Grunewald
Modified: 2015-03-31 22:01 UTC (History)
7 users (show)

Fixed In Version: hamster-time-tracker-1.04-4.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-31 21:52:56 UTC


Attachments (Terms of Use)
File: backtrace (531 bytes, text/plain)
2014-03-11 09:58 UTC, Soeren Grunewald
no flags Details
File: environ (989 bytes, text/plain)
2014-03-11 09:59 UTC, Soeren Grunewald
no flags Details
using hamster (4.23 MB, application/octet-stream)
2014-03-18 12:58 UTC, Soeren Grunewald
no flags Details
Using hamster the same way (516.51 KB, application/octet-stream)
2014-04-02 08:01 UTC, Soeren Grunewald
no flags Details

Description Soeren Grunewald 2014-03-11 09:58:53 UTC
Description of problem:
1. Opened Overview
2. Selected last entry
3. Right click on the entry
4. Select "Add new"

Version-Release number of selected component:
hamster-time-tracker-1.04-1.fc20

Additional info:
reporter:       libreport-2.1.12
cmdline:        /usr/bin/python /usr/bin/hamster-windows-service
executable:     /usr/bin/hamster-windows-service
kernel:         3.13.5-202.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
overview.py:385:on_add_activate:TypeError: 'Fact' object has no attribute '__getitem__'

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/hamster/overview.py", line 385, in on_add_activate
    selected_date = fact["date"]
TypeError: 'Fact' object has no attribute '__getitem__'

Local variables in innermost frame:
action: <gtk.Action object at 0x2278fa0 (GtkAction at 0x239cd80)>
self: <Overview object at 0x221feb0 (hamster+overview+Overview at 0x21b9e80)>
fact: <hamster.lib.Fact object at 0x2642f90>

Potential duplicate: bug 1044531

Comment 1 Soeren Grunewald 2014-03-11 09:58:58 UTC
Created attachment 873033 [details]
File: backtrace

Comment 2 Soeren Grunewald 2014-03-11 09:59:00 UTC
Created attachment 873034 [details]
File: environ

Comment 3 Ankur Sinha (FranciscoD) 2014-03-11 23:21:40 UTC
Hi Soeren,

Thank you for your bug report. 

On my system here, right clicking and using "add new" does nothing at all (which is a separate bug really). Can you reproduce your bug consistently?

Thanks,
Warm regards,
Ankur

Comment 4 Ankur Sinha (FranciscoD) 2014-03-11 23:29:40 UTC
(Even Activity -> add new does nothing here)

Comment 5 Soeren Grunewald 2014-03-12 07:56:30 UTC
Hi Ankur,

yes it is reproducible, when tracking is running.

1. select the running activity 
2. right-click on the running activity
3. select "add new"

Abrt will show up...

Comment 6 Ankur Sinha (FranciscoD) 2014-03-15 12:00:28 UTC
(In reply to Soeren Grunewald from comment #5)
> Hi Ankur,
> 
> yes it is reproducible, when tracking is running.
> 
> 1. select the running activity 
> 2. right-click on the running activity
> 3. select "add new"
> 
> Abrt will show up...

Interesting. It isn't crashing for me here. Can you please check the screencast to see if I'm doing the correct steps:

http://ankursinha.fedorapeople.org/hamster-screencast.webm

It just doesn't do anything, but abrt isn't coming up yet. 

Thanks,
Ankur

Comment 7 Soeren Grunewald 2014-03-18 12:58:35 UTC
Created attachment 875922 [details]
using hamster

Hi, It looks a bit different, i will try to reproduce it. For now, see attached screen-cast how i use it.
--
Soeren

Comment 8 Soeren Grunewald 2014-04-02 08:01:51 UTC
Created attachment 881660 [details]
Using hamster the same way

Finally I found the time to do it the same way as shown in your sample. The issue does also appear.
--
Soeren

Comment 9 Pierre Ossman 2014-05-26 09:32:55 UTC
Not sure what's going on in that code. Sometimes "facts" are dictionaries, and sometimes they are "Fact" objects. Some refactoring in progress I guess...

Anyway, to fix this particular bug you should replace fact["date"] with fact.date.

Comment 10 Pierre Ossman 2014-10-16 14:51:27 UTC
Can we get a fix for this anytime soon?

Comment 11 Ankur Sinha (FranciscoD) 2014-10-16 16:38:58 UTC
I missed your earlier comment somehow. I'll look at it this week.

Comment 12 Ankur Sinha (FranciscoD) 2014-11-23 19:09:27 UTC
*** Bug 1044531 has been marked as a duplicate of this bug. ***

Comment 13 Ankur Sinha (FranciscoD) 2014-11-23 19:11:50 UTC
Building an update. Also reported upstream: https://github.com/projecthamster/hamster/issues/201

Comment 14 Fedora Update System 2014-11-23 20:15:25 UTC
hamster-time-tracker-1.04-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hamster-time-tracker-1.04-4.fc20

Comment 15 Fedora Update System 2014-11-23 20:16:36 UTC
hamster-time-tracker-1.04-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/hamster-time-tracker-1.04-4.fc21

Comment 16 Fedora Update System 2014-11-24 20:57:47 UTC
Package hamster-time-tracker-1.04-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hamster-time-tracker-1.04-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-15640/hamster-time-tracker-1.04-4.fc21
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2015-03-31 21:52:56 UTC
hamster-time-tracker-1.04-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-03-31 22:01:05 UTC
hamster-time-tracker-1.04-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.