GTG

hamster integration plugins crash when start a task

Bug #1102453 reported by nueces
162
This bug affects 35 people
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Critical
Unassigned

Bug Description

After configuring the hamster integration plugin I try to start a task, using the hasmter icon, the program crash with the following traceback.

Traceback (most recent call last):
  File "/usr/share/gtg/GTG/plugins/hamster/hamster.py", line 244, in browser_cb
    self.sendTask(plugin_api.get_requester().get_task(task_id))
  File "/usr/share/gtg/GTG/plugins/hamster/hamster.py", line 98, in sendTask
    hamster_id=self.hamster.AddFact(activity, tag_str, 0, 0, category, description)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
TypeError: AddFact() takes at most 5 arguments (7 given)

I'm usging Debian SID, with the following software verions.

nueces@flatty:~$ apt-cache policy hamster-applet
hamster-applet:
  Installed: 2.91.3+git20120514.b9fec3e1-1
  Candidate: 2.91.3+git20120514.b9fec3e1-1
  Version table:
 *** 2.91.3+git20120514.b9fec3e1-1 0
        500 http://ftp.debian.org/debian/ sid/main amd64 Packages
        100 /var/lib/dpkg/status

nueces@flatty:~$ apt-cache policy gtg
gtg:
  Installed: 0.2.9-1
  Candidate: 0.2.9-1
  Version table:
     0.3-1 0
          1 http://ftp.debian.org/debian/ experimental/main amd64 Packages
 *** 0.2.9-1 0
        500 http://ftp.debian.org/debian/ sid/main amd64 Packages
        100 /var/lib/dpkg/status

I did un upgrate to use the 0.3-1 from experimental, but i get the same error with a similar traceback

Traceback (most recent call last):
  File "/usr/share/gtg/GTG/plugins/hamster/hamster.py", line 264, in browser_cb
    self.sendTask(plugin_api.get_requester().get_task(task_id))
  File "/usr/share/gtg/GTG/plugins/hamster/hamster.py", line 109, in sendTask
    category, description)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
TypeError: AddFact() takes at most 5 arguments (7 given)

Related branches

Izidor Matušov (izidor)
Changed in gtg:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Izidor Matušov (izidor)
milestone: none → 0.3.1
Revision history for this message
nueces (nueces) wrote :

I was traying to fix the bug, but I found that this is a duplicated of LP#947568. The a patch that is attached on the other reporrt, for what could I read on it, fix the issue.

Izidor Matušov (izidor)
Changed in gtg:
assignee: Izidor Matušov (izidor) → nobody
Nimit Shah (nimit-svnit)
summary: - hamter integration plugins crash when start a task
+ hamster integration plugins crash when start a task
Nimit Shah (nimit-svnit)
Changed in gtg:
assignee: nobody → Nimit Shah (nimit-svnit)
Nimit Shah (nimit-svnit)
Changed in gtg:
assignee: Nimit Shah (nimit-svnit) → nobody
Nimit Shah (nimit-svnit)
Changed in gtg:
assignee: nobody → Nimit Shah (nimit-svnit)
Nimit Shah (nimit-svnit)
Changed in gtg:
status: Confirmed → In Progress
Nimit Shah (nimit-svnit)
Changed in gtg:
assignee: Nimit Shah (nimit-svnit) → nobody
status: In Progress → Confirmed
Revision history for this message
Vitaliy Shkolin (vitaliy-shkolin) wrote :

I have the same problem, how to fix this error? Thank you.

Revision history for this message
The_ERROR (spam-trash-2) wrote :

Same problem here.

Revision history for this message
Nimit Shah (nimit-svnit) wrote :

Hi Vitality, unfortunately there is no workaround available here.
If you have time, maybe you could look at the branch linked to the bug and help solve the bug. It would be a highly appreciated contribution :)

Revision history for this message
Paschalis Antoniou (don-pasquale) wrote :

Exact same problem here...

Revision history for this message
Derek Moore (derek-p-moore) wrote :

Basically, line 108 of /usr/lib/python2.7/site-packages/GTG/plugins/hamster/hamster.py needs to change...

The newer function signature to Hamster's AddFact dbus call has an in type string of "siib" and parameter names of "fact, start_time, end_time, temporary = False".

fact is now a string that is parsed by hamster, which can contain "[time] Activity@Category, Description". See "Input" page in hamster-time-tracker help file.

Several things about the hamster plugin need to be fixed. The GTG Tag to Activity preference is kinda broken, and limited due to the fact that activities can have spaces but GTG tags cannot, etc., etc.

I've fixed my GTG->Hamster plugin, but I'll probably be doing more work on it to fix it up to my standards and usage. I'll probably submit a patch as my edits to hamster.py improve.

Revision history for this message
Rex Tsai (chihchun) wrote :

Hi, there
I have another patch for this issue.
https://code.launchpad.net/~chihchun/gtg/gtg-lp1102453/+merge/187676

Changed in gtg:
status: Confirmed → In Progress
Revision history for this message
Felix Kaminsky (felixkaminsky) wrote :

@Rex: Thanks for the fix.

Revision history for this message
Nimit Shah (nimit-svnit) wrote :

Fix committed in revision 1310

Changed in gtg:
status: In Progress → Fix Committed
Nimit Shah (nimit-svnit)
Changed in gtg:
status: Fix Committed → Fix Released
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.