After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 558912 - hamster applet crashed on adding it to a panel
hamster applet crashed on adding it to a panel
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: general
2.24.x
Other All
: Normal critical
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-02 12:31 UTC by Islam Amer
Modified: 2008-11-21 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to set category name as task list name (2.72 KB, patch)
2008-11-02 12:32 UTC, Islam Amer
committed Details | Review

Description Islam Amer 2008-11-02 12:31:01 UTC
Steps to reproduce:
1. Install hamster-applet svn
2. Add it to a panel but nothing appears
3. run in it in window mode ( -w ) and get a python traceback due to to a crash


Stack trace:
/usr/lib/hamster-applet/hamster-applet -w
Running installed hamster, using [/usr/lib/python2.5/site-packages/hamster:$PYTHONPATH]
Data Dir: /usr/share/hamster-applet
SELECT version FROM version None
UPDATE version SET version = 4 ()
select count(*) from categories None
Binding shortcut <Super>S to popup hamster

** (hamster-applet:3020): WARNING **: Binding '<Super>S' failed!

Running with options: {'do_trace': False, 'standalone': True}
/usr/lib/python2.5/site-packages/hamster/applet.py:284: GtkWarning: gtk_cell_layout_set_attributes: assertion `GTK_IS_CELL_RENDERER (cell)' failed
  self.activity_list.set_property("text-column", 2)

                   SELECT a.id AS id,
                          a.start_time AS start_time,
                          a.end_time AS end_time,
                          b.name AS name, b.id as activity_id,
                          coalesce(c.name, ?) as category, c.id as category_id
                     FROM facts a
                LEFT JOIN activities b ON a.activity_id = b.id
                LEFT JOIN categories c on b.category_id = c.id
                    WHERE date(a.start_time) >= ? and date(a.start_time) <= ?
                 ORDER BY a.start_time
         ('Unsorted', datetime.date(2008, 11, 2), datetime.date(2008, 11, 2))

                   SELECT lower(a.name) as name, b.name as category
                     FROM activities a
                LEFT JOIN categories b on coalesce(b.id, -1) = a.category_id
                    WHERE deleted is null
                 ORDER BY lower(a.name)
         None

                   SELECT a.*, b.name as category, b.category_order
                     FROM activities a
                LEFT JOIN categories b on coalesce(b.id, -1) = a.category_id
                    WHERE a.category_id > -1
                      AND a.deleted is null
                 ORDER BY category_order, activity_order
         None
** (hamster-applet:3020): DEBUG: Opening calendar source uri: file:///home/iamer/.evolution/tasks/local/system

** (hamster-applet:3020): DEBUG: Opening calendar source uri: file:///home/iamer/.evolution/tasks/local/1223484641.7362.0@phoenix

** (hamster-applet:3020): DEBUG: Opening calendar source uri: file:///home/iamer/.evolution/tasks/local/1225186443.5668.0@phoenix

Traceback (most recent call last):
  • File "/usr/lib/hamster-applet/hamster-applet", line 133 in <module>
    build_window()
  • File "/usr/lib/hamster-applet/hamster-applet", line 74 in build_window
    applet_factory(applet, None)
  • File "/usr/lib/hamster-applet/hamster-applet", line 63 in applet_factory
    hamster.applet.HamsterApplet(applet)
  • File "/usr/lib/python2.5/site-packages/hamster/applet.py", line 222 in __init__
    self.refresh_menu()
  • File "/usr/lib/python2.5/site-packages/hamster/applet.py", line 443 in refresh_menu
    self.activities.append([activity['name']])
ValueError: row sequence has wrong length


Other information:
I debugged the problem and it seems to happen because the view and model for storing tasks and categories changed, but tasks gotten from evolution were not updated to be stored in the same way.

I will include a patch that fixes this for me by setting the category to the task list's name.
Comment 1 Islam Amer 2008-11-02 12:32:50 UTC
Created attachment 121812 [details] [review]
patch to set category name as task list name
Comment 2 daniel 2008-11-21 08:39:26 UTC
This patch could really do with being applied.  I've had to base my patches on before this problem started manifesting, to be able to test them.  Obviously it would be better if I could base my code on HEAD.
Comment 3 Toms Bauģis 2008-11-21 09:59:23 UTC
ah, sorry - human after all (a little swamped though, haha).

Islam: your patch was mixing tabs with spaces - that's a dangerous thing in python :)
Anyway, fixed that and committed patch to trunk - thanks

Daniel: thanks for reminding!
Comment 4 Islam Amer 2008-11-21 12:43:50 UTC
Thanks for applying the patch, I am happy to help. Sorry about the mixed indentation, I will talk to my vim about it :P

I'd like to help in developing hamster applet. Have you decided to implement any of the enhancement and feature requests ? Anything I can help with ?

Keep up the good work :)
Comment 5 Toms Bauģis 2008-11-21 13:22:26 UTC
ooh, fields where one could dive in:

* it'd be good that tasks from evolution do not get automatically added to 
  categories/activities - i think it is happening now, after applying the patch.

* the whole evo thing could use some love - like when a task gets resolved in 
  evolution - stop tracking also in hamster, and also update the list when evo 
  changes it.
  not sure if there is the necessary API for that, though.

* Bug 561454, Bug 561284, and small things, like Bug 559207.
* Bug 529401 could also be interesting
* bug 529113

if you decide to grab any of the bugs, feel free to assign them to yourself so we know that somethings going on!