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 642304 - Cannot edit Activity
Cannot edit Activity
Status: RESOLVED DUPLICATE of bug 642488
Product: hamster-applet
Classification: Deprecated
Component: general
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-14 17:07 UTC by Martin Eckart
Modified: 2011-05-21 13:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the case where "name" is null (609 bytes, patch)
2011-04-20 17:07 UTC, Olivier Tremblay
rejected Details | Review

Description Martin Eckart 2011-02-14 17:07:09 UTC
When I click the 'edit' icon on an activity in the overview or day's activity list Hamster fails with the following error:


** (hamster-applet:8061): DEBUG: Opening calendar source uri: file:///home/martron/.evolution/tasks/local/system

Traceback (most recent call last):
  • File "/usr/lib/pymodules/python2.6/hamster/overview_activities.py", line 60 in <lambda>
    self.fact_tree.connect("edit-clicked", lambda tree, fact: self.on_edit_clicked(fact))
  • File "/usr/lib/pymodules/python2.6/hamster/overview_activities.py", line 126 in on_edit_clicked
    self.launch_edit(fact)
  • File "/usr/lib/pymodules/python2.6/hamster/overview_activities.py", line 135 in launch_edit
    dialogs.edit.show(self, fact_id = fact_or_date["id"])
  • File "/usr/lib/pymodules/python2.6/hamster/configuration.py", line 98 in show
    dialog = self.get_dialog_class()(parent, **kwargs)
  • File "/usr/lib/pymodules/python2.6/hamster/edit_activity.py", line 119 in __init__
    self.on_in_progress_toggled(self.get_widget("in_progress"))
  • File "/usr/lib/pymodules/python2.6/hamster/edit_activity.py", line 241 in on_in_progress_toggled
    self.validate_fields()
  • File "/usr/lib/pymodules/python2.6/hamster/edit_activity.py", line 279 in validate_fields
    activity_text, temporary = self.new_name.get_value()
  • File "/usr/lib/pymodules/python2.6/hamster/widgets/activityentry.py", line 117 in get_value
    name = "%s@%s" % name, activity['category']
TypeError: not enough arguments for format string


This is using Ubuntu 10.10 64 bit.
Comment 1 Toms Bauģis 2011-02-14 17:18:01 UTC
have you tried reproducing the bug with the code check out from the repository?
Comment 2 Martin Eckart 2011-02-14 18:24:38 UTC
Yes, I just installed from Git and the same error occurs with 2.91.3.

My current theory is that I have category names that include square brackets, maybe that code is trying to turn those categories into arrays instead of strings?

e.g. MyCategoryName[x]
Comment 3 zioalex 2011-03-11 13:02:30 UTC
Hi dear,
I'm using gentoo with hamster 2.32.1 but I have the same problem; I can't edit the task.

How can I do more debug?

Any news about this problem?
Comment 4 zioalex 2011-03-18 09:59:24 UTC
Any news on this bug?
How can I help ?

Can we confirm? 
It exists.
Comment 5 zioalex 2011-03-22 11:06:13 UTC
I've tried with the last code from repository and I get the same error:
Traceback (most recent call last):
  • File "/tmp/hamster-applet/src/hamster/applet.py", line 509 in _open_edit_activity
    dialogs.edit.show(self.applet, fact_id = fact.id)
  • File "/tmp/hamster-applet/src/hamster/configuration.py", line 98 in show
    dialog = self.get_dialog_class()(parent, **kwargs)
  • File "/tmp/hamster-applet/src/hamster/edit_activity.py", line 119 in __init__
    self.on_in_progress_toggled(self.get_widget("in_progress"))
  • File "/tmp/hamster-applet/src/hamster/edit_activity.py", line 225 in on_in_progress_toggled
    self.validate_fields()
  • File "/tmp/hamster-applet/src/hamster/edit_activity.py", line 263 in validate_fields
    activity_text, temporary = self.new_name.get_value()
  • File "/tmp/hamster-applet/src/hamster/widgets/activityentry.py", line 116 in get_value
    name = "%s@%s" % name, activity['category']
TypeError: not enough arguments for format string

Comment 6 Olivier Tremblay 2011-04-20 17:05:04 UTC
I had the same bug, I don't know if it's the proper way to do this but the following patch did it for me.
Comment 7 Olivier Tremblay 2011-04-20 17:07:15 UTC
Created attachment 186377 [details] [review]
Fixes the case where "name" is null

This makes sure the code doesn't crash even if "activity name" is null. I'm not sure it's the correct approach, but it shuts the error up, and my edition window comes back and is fully editable.
Comment 8 zioalex 2011-04-22 13:36:29 UTC
It works for me!
Thanks
Comment 9 Toms Bauģis 2011-05-21 13:29:16 UTC
sorry for taking so long. this is a dupe and has been fixed in git master

*** This bug has been marked as a duplicate of bug 642488 ***
Comment 10 Toms Bauģis 2011-05-21 13:29:44 UTC
Review of attachment 186377 [details] [review]:

obsolete