← Back to team overview

zeitgeist team mailing list archive

[Bug 497316] Re: TypeError: get_most_used_with_subjects() takes exactly 5 arguments (2 given)

 

revision rainct@xxxxxxxxxx-20091216121046-z75eokvwb8vmyhzf (1232)
Author: Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>
Date: Wed 2009-12-16 13:10:46 +0100
Branch: zeitgeist-trunk
Bugs: https://launchpad.net/bugs/497316 fixed

    Fix GetMostUsedWithSubjects D-Bus to take all 5
    arguments required by get_most_used_with_subjects.
    
    Fix the test-case in ./test/remote-test.py.

** Changed in: zeitgeist
       Status: Confirmed => Fix Released

-- 
TypeError: get_most_used_with_subjects() takes exactly 5 arguments (2 given)
https://bugs.launchpad.net/bugs/497316
You received this bug notification because you are a member of Zeitgeist
Developers, which is the registrant for Zeitgeist Framework.

Status in Zeitgeist Framework: Fix Released

Bug description:
I just added a new testcase to tests/remote-test.py, which is unfortunatly failing:

markus@thekorn ~/devel/zeitgeist/trunk % python test/remote-test.py ZeitgeistRemoteAPITest.testGetMostUsedWithSubjects                                  :(
DEBUG:zeitgeist.engine:Creating engine 'resonance'
INFO:zeitgeist.engine:Using database: :memory:
DEBUG:root:Checking for another running instance...
DEBUG:root:No running instances found.
INFO:root:Starting Zeitgeist service...
DEBUG:zeitgeist.engine:Inserted 23 events in 0.010520s
E
======================================================================
ERROR: testGetMostUsedWithSubjects (__main__.ZeitgeistRemoteAPITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/remote-test.py", line 200, in testGetMostUsedWithSubjects
    result = self.client._iface.GetMostUsedWithSubjects(["i4"])
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/media/devel/zeitgeist/trunk/_zeitgeist/engine/remote.py", line 88, in GetMostUsedWithSubjects
    return _engine.get_most_used_with_subjects(uris)
TypeError: get_most_used_with_subjects() takes exactly 5 arguments (2 given)


----------------------------------------------------------------------
Ran 1 test in 3.032s

FAILED (errors=1)

So either make all argument accessible via the DBus API or choose reasonable defaults





References