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
I guess you can just generate that URL from the bug's ID, then use standard
python urllib or similar to fetch the web page contents. I don't think there's
any bugzilla API call that does what you want though
- Cole
On 01/13/2015 03:35 PM, Ravikumar Patel wrote:
> I'll guide you through the steps I've followed to clarify what I mean. First,
> I queried for all bugs for a specific person. I then got a list of bugs for
> that person with all of their bug IDs. I clicked on one of the bug ID and it
> gave me a page with that bug's summary, status, aliases, product, etc. Once
> you get to the bottom of the page, you have a link to it's XML view/page. (see
> screenshot below)
>
> Inline image 1
>
> Now I want to get access to this page (using my python script from previous
> emails):
> Inline image 3
>
> I want to know if I can access this XML page from a corresponding bug ID via a
> python script?
>
> Thanks,
> Ravi
>
>
> On Tue, Jan 13, 2015 at 2:25 PM, Cole Robinson <crobinso(a)redhat.com
> <mailto:crobinso@redhat.com>> wrote:
>
> I don't know what you mean by 'xml page'
>
> - Cole
>
> On 01/13/2015 02:23 PM, Ravikumar Patel wrote:
> > This is a follow up question. How do I now access each bug's XML page now that
> > I have the bug IDs I needed?
> >
> > On Tue, Jan 13, 2015 at 1:34 PM, Cole Robinson <crobinso(a)redhat.com <mailto:crobinso@redhat.com>
> > <mailto:crobinso@redhat.com <mailto:crobinso@redhat.com>>> wrote:
> >
> > On 01/13/2015 12:59 PM, Ravikumar Patel wrote:
> > > Hello,
> > >
> > > I am trying to get the bug ID of all bugs from my Bugzilla account. Any
> > > suggestions as to how I am able to do so? Is it possible that to query for all
> > > projects and then access the bug IDs from each project? If so, then how?
> > >
> > > So far my code looks like this:
> > >
> > > |bz = bugzilla.Bugzilla(url='https://bugzilla.mycompany.com/xmlrpc.cgi')
> > > try:
> > > bz.login('name(a)email.com <mailto:name@email.com> <mailto:name@email.com
> <mailto:name@email.com>>
> > <mailto:name@email.com <mailto:name@email.com>
> <mailto:name@email.com <mailto:name@email.com>>>', 'password');
> > > print'Authorization cookie received.'
> > > except bugzilla.BugzillaError:
> > > print(str(sys.exc_info()[1]))
> > > sys.exit(1)|
> > >
> > > Here is the link to the stackoverflow question page:
> > > http://stackoverflow.com/questions/27869663/how-do-i-query-bugzilla-to-get-…
> > >
> > > I really need help on this. Any suggestions?
> >
> > bugs = bz.query(bz.build_query(assigned_to="your-bugzilla-account"))
> > for bug in bugs:
> > print bug.id <http://bug.id> <http://bug.id>
> >
> > - Cole
> >
> >
> >
> >
>
>
Hello,
I am trying to get the bug ID of all bugs from my Bugzilla account. Any
suggestions as to how I am able to do so? Is it possible that to query for
all projects and then access the bug IDs from each project? If so, then how?
So far my code looks like this:
bz = bugzilla.Bugzilla(url='https://bugzilla.mycompany.com/xmlrpc.cgi')try:
bz.login('name(a)email.com', 'password');
print'Authorization cookie received.'except bugzilla.BugzillaError:
print(str(sys.exc_info()[1]))
sys.exit(1)
Here is the link to the stackoverflow question page:
http://stackoverflow.com/questions/27869663/how-do-i-query-bugzilla-to-get-…
I really need help on this. Any suggestions?
On 01/09/2015 04:55 PM, Ravikumar Patel wrote:
> Thanks for the response. It was really helpful.
>
> I have another question. Is it possible to query for all the bug IDs for a
> given Bugzilla account? So far I have the following as the code:
>
> bz = bugzilla.Bugzilla(url='https://bugzilla.myname.com/xmlrpc.cgi')
> try:
> bz.login('email(a)email.com <mailto:email@email.com>', 'batman');
> print'Authorization cookie received.'
> except bugzilla.BugzillaError:
> print(str(sys.exc_info()[1]))
> sys.exit(1)
>
> # list = bz.query_all_bug_ids ?
>
Please keep the mailing list in CC
>From the command line you can do
./bugzilla query --assigned_to foo(a)example.com
Pass the --debug flag to look at what API calls are being generated. Basically
look at bz.query and bz.build_query
- Cole
Hello,
Could I get a list of all attributes/methods to get information of a bug
from bugzilla. So far I know that you can get the summary and version. Not
sure of the rest. Could you please send me the list. Thanks.
Regards,
Ravi