[python-bugzilla] Bug.get_bugs removed in favor of Bug.get

Dustin Mitchell dustin at mozilla.com
Tue Jan 27 18:52:21 UTC 2015


I recently started getting tracebacks:

CRITICAL:bugzilla_mozilla:Worker for [bugzilla_mozilla] failed: <Fault
-32601: "The requested method 'Bug.get_bugs' was not found.">
TRACE Traceback (most recent call last):
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/__init__.py",
line 470, in _aggregate_issues
TRACE     for issue in service.issues():
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
line 200, in issues
TRACE     ) for bug in bugs
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
line 199, in <genexpr>
TRACE     ((col, _get_bug_attr(bug, col)) for col in self.COLUMN_LIST)
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/bugwarrior/services/bz.py",
line 221, in _get_bug_attr
TRACE     return getattr(bug, attr, [])
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/bug.py",
line 102, in __getattr__
TRACE     self.refresh(extra_fields=[name])
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/bug.py",
line 115, in refresh
TRACE     extra_fields=self._bug_fields + (extra_fields or []))
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
line 976, in _getbug
TRACE     extra_fields=extra_fields)[0]
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
line 948, in _getbugs
TRACE     r = self._proxy.Bug.get_bugs(getbugdata)
TRACE   File "/usr/lib64/python2.7/xmlrpclib.py", line 1233, in __call__
TRACE     return self.__send(self.__name, args)
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
line 165, in _ServerProxy__request
TRACE     ret = ServerProxy._ServerProxy__request(self, methodname, params)
TRACE   File "/usr/lib64/python2.7/xmlrpclib.py", line 1591, in __request
TRACE     verbose=self.__verbose
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
line 260, in request
TRACE     return self._request_helper(url, request_body)
TRACE   File "/home/dustin/code/taskwarrior/t/bugwarrior-prod/sandbox/lib/python2.7/site-packages/bugzilla/base.py",
line 242, in _request_helper
TRACE     raise sys.exc_info()[1]
TRACE Fault: <Fault -32601: "The requested method 'Bug.get_bugs' was
not found.">

https://www.bugzilla.org/docs/4.2/en/html/api/Bugzilla/WebService/Bug.html
says that `get_bugs` exists only for compatibility with the 3.0 API.
Apparently the Mozilla Bugzilla instance has been upgraded to a
version of 4.2 (4.2.13, I think) which no longer has this
compatibility mechanism.

It'd be great to either switch wholesale, or automatically fall back
or forward from one method to the other, rather than simply failing.

Dustin


More information about the python-bugzilla mailing list