pybugz icon indicating copy to clipboard operation
pybugz copied to clipboard

Traceback while doing search...

Open aniruddha-a opened this issue 11 years ago • 6 comments

Issue with latest snapshot (head at 128ac8d724d7994477702a4b7455e207bf6b4d37)

I have bugzilla 4.4.4 and Python 3.3.0, today morning I installed latest PyBugz current snapshot and I see the following error:

$ bugz --connection myconn --debug  3 search --assigned-to [email protected]
 * Using http://bugzilla.mycompany.com 
 * Searching for bugs with the following options:
 *    assigned_to          = [email protected]
Traceback (most recent call last):
  File "/usr/local/bin/bugz", line 72, in <module>
    sys.exit(main())
  File "/usr/local/bin/bugz", line 47, in main
    args.func(bugz, args)
  File "/usr/local/lib/python3.3/site-packages/bugz/cli.py", line 263, in search
    result = self.call_bz(self.bz.Bug.search, params)['bugs']
  File "/usr/local/lib/python3.3/site-packages/bugz/cli.py", line 162, in call_bz
    return method(*self.set_token(*args))
  File "/usr/local/lib/python3.3/xmlrpc/client.py", line 1090, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python3.3/xmlrpc/client.py", line 1419, in __request
    verbose=self.__verbose
  File "/usr/local/lib/python3.3/site-packages/bugz/bugzilla.py", line 55, in request
    return self.parse_response(resp)
  File "/usr/local/lib/python3.3/xmlrpc/client.py", line 1312, in parse_response
    p.feed(data)
  File "/usr/local/lib/python3.3/xmlrpc/client.py", line 446, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 116, column 4

aniruddha-a avatar Sep 02 '14 17:09 aniruddha-a

Hello,

I am unable to reproduce this with python 3.3.5 and Bugzilla 4.4.5. Is it possible for you to test with python 3.3.5?

williamh avatar Sep 02 '14 19:09 williamh

Hi William,

I upgraded to Python 3.3.5, bugzilla - I can't upgrade! I still see the same issue (same exact traceback as before) :(

This is what I did:

$ sudo python3 setup.py install            # from the pybugz source dir
$ python3 --version 
Python 3.3.5

aniruddha-a avatar Sep 03 '14 06:09 aniruddha-a

I tried the following, to check for the received XML

curl --silent --insecure  \
    http://bugzilla.mycompany.com/xmlrpc.cgi \
    -H "Content-Type: text/xml" \
    -d "<?xml version='1.0' encoding='UTF-8'?><methodCall><methodName>Bug.search</methodName> \
            <params><param><value><struct> \
            <member><name>assigned_to</name><value><string>[email protected]</string></value></member> \
            </struct></value></param> </params> </methodCall>" 

And I got a valid XML listing of all my bugs - I could parse/dump it with xmllint

So, I'm not sure why I see the Expat parser error on the last line!. If the internal query from pybugz is different, you can let me know the query URI, and I can manually try it out.

aniruddha-a avatar Sep 03 '14 07:09 aniruddha-a

I haven't forgotten about this bug. I do not currently have a way to print out the xml of the query before it gets sent to Bugzilla. I will need to do that before I can compare it to what you did with curl.

williamh avatar Sep 30 '14 14:09 williamh

Sure. If you need any more information from my side, do let me know.

aniruddha-a avatar Sep 30 '14 18:09 aniruddha-a

I moved to Ubuntu 16.06 (Xenial) and just gave this a try, the issue still persists :(

$ python3 --version
Python 3.5.2
$ /usr/local/bin/bugz --version
bugz 0.13

aniruddha-a avatar Aug 25 '16 09:08 aniruddha-a