Hi Julien,
thanks for the reply. Regarding your original bugreport, the usertags
parameter seems not to be documented in the wiki:
https://wiki.debian.org/DebbugsSoapInterface
Since it seems to work anyways for you, do you mind closing the
bugreport now? I was closing it, because I didn't receive an answer from
you for two years.
Cheers,
Bastian
Am 19.12.20 um 11:57 schrieb Julien Cristau:
I think it must have been something like this:
ut = debianbts.get_usertag('release.debian....@packages.debian.org')
debianbts.get_bugs(package='release.debian.org', tag=['pu', 'buster'],
usertags=ut)
https://salsa.debian.org/debbugs-team/debbugs/-/blob/master/lib/Debbugs/Bugs.pm#L117
describes the usertags param for get_bugs.
I get:
SoapFault: soap:Client: Application failed during request deserialization:
not well-formed (invalid token) at line 5, column 304, byte 544 at
/usr/lib/x86_64-linux-gnu/perl5/5.28/XML/Parser/Expat.pm line 487.
XML::Parser::Expat::parse(XML::Parser::Expat=HASH(0x55d36e3b48e8), "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at
/usr/lib/x86_64-linux-gnu/perl5/5.28/XML/Parser.pm line 187
eval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.28/XML/Parser.pm
line 186
XML::Parser::parse(XML::Parser=HASH(0x55d36e2d6d50), "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at /usr/share/perl5/SOAP/Lite.pm line 1788
eval {...} called at /usr/share/perl5/SOAP/Lite.pm line 1787
SOAP::Parser::decode(SOAP::Parser=HASH(0x55d36cc1fc48), "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at /usr/share/perl5/SOAP/Lite.pm line 2153
SOAP::Deserializer::decode(SOAP::Deserializer=HASH(0x55d36cc20020), "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at /usr/share/perl5/SOAP/Lite.pm line 2170
SOAP::Deserializer::deserialize(SOAP::Deserializer=HASH(0x55d36cc20020), "<?xml
version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at
/usr/share/perl5/SOAP/Lite.pm line 2848
eval {...} called at /usr/share/perl5/SOAP/Lite.pm line 2848
eval {...} called at /usr/share/perl5/SOAP/Lite.pm line 2844
SOAP::Server::handle(Debbugs::SOAP::Server=HASH(0x55d36cc03e70), "<?xml version=\"1.0\"
encoding=\"UTF-8\"?><soap:Envelope xmlns:xs"...) called at
/usr/share/perl5/SOAP/Transport/HTTP.pm line 459
SOAP::Transport::HTTP::Server::handle(Debbugs::SOAP::Server=HASH(0x55d36cc03e70))
called at /usr/share/perl5/SOAP/Transport/HTTP.pm line 627
SOAP::Transport::HTTP::CGI::handle(Debbugs::SOAP::Server=HASH(0x55d36cc03e70))
called at /srv/bugs.debian.org/cgi-bin/soap.cgi line 44
eval {...} called at /srv/bugs.debian.org/cgi-bin/soap.cgi line 40
My patch from 2 years ago is probably wrong as I can't seem to get it to work
now.
Interestingly this seems to work though, even without the patch:
debianbts.get_bugs(package='release.debian.org',
tag=['pu', 'buster'],
usertags={'pu': ut['pu']}))
So maybe I got this wrong back then and the cause is something entirely
different...
Cheers,
Julien
On Sat, Sep 29, 2018 at 11:54:21PM +0200, Bastian Venthur wrote:
Hi Julien,
can you please provide a call to reproduce the error? According to the
docs, the get_bugs has no `usertags` parameter:
https://wiki.debian.org/DebbugsSoapInterface
Cheers,
Bastian
On Wed, 15 Aug 2018 09:57:42 +0200 Julien Cristau <jcris...@debian.org>
wrote:
Package: python-debianbts
Version: 2.7.2
Severity: normal
Tags: patch
Hi,
marshaling for get_bugs' "usertags" param doesn't seem to work properly.
There's some special casing with _build_int_array_el for lists and
tuples but not for dicts. The below seems to make it work.
Cheers,
Julien
diff --git a/debianbts/debianbts.py b/debianbts/debianbts.py
index d638e26..8816b7a 100644
--- a/debianbts/debianbts.py
+++ b/debianbts/debianbts.py
@@ -405,6 +405,13 @@ def get_bugs(*key_value):
arg_name = 'arg' + str(arg_n)
if isinstance(kv, (list, tuple)):
_build_int_array_el(arg_name, method_el, kv)
+ elif isinstance(kv, dict):
+ el = method_el.add_child(arg_name)
+ for k, v in kv.items():
+ if isinstance(v, (list, tuple)):
+ _build_int_array_el(k, el, v)
+ else:
+ el.marshall(k, v)
else:
method_el.marshall(arg_name, kv)
--
Dr. Bastian Venthur http://venthur.de
Debian Developer venthur at debian org
--
Dr. Bastian Venthur https://venthur.de
Debian Developer venthur at debian org