Bug 650114 - xml.parsers.expat.ExpatError: not well-formed (invalid token): line 26, column 13
Summary: xml.parsers.expat.ExpatError: not well-formed (invalid token): line 26, colum...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 3.6
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Simon Green
QA Contact:
URL:
Whiteboard:
: 461817 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-05 09:12 UTC by Richard W.M. Jones
Modified: 2025-10-16 23:28 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-07-28 20:27:25 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1051530 0 medium CLOSED XMLRPC response is not well-formed 2025-10-16 23:35:19 UTC

Internal Links: 1051530 1406841 1933606

Description Richard W.M. Jones 2010-11-05 09:12:07 UTC
Description of problem:

Doing a simple bug query generates this python error
(note you have to let the command run for a little while):

bugzilla query -b '242651,250925,342731,429535,434560,435546,436835,436836,436843,438025,438026,443843,445074,451388,453389,454211,454493,457693,457695,458265,458482,460780,460872,460894,465587,466168,468997,484777,489100,499369,501882,501884,501886,501889,501893,501894,502074,502174,502206,502740,503134,503236,504777,504855,505109,507278,507810,508121,508197,510194,518190,518284,521674,523391,524476,524481,526034,528454,528461,532585,539698,539746,541542,541618,544727,547479,547488,548097,548098,548723,554829,555803,555849,563103,563450,564798,566922,571686,572104,572337,576879,578103,579664,579802,580913,582484,583974,584228,584387,584389,584392,584393,584397,584398,584399,584401,584403,585221,585222,585223,587877,588651,591142,591155,591250,592053,592883,592910,593511,594419,595006,596354,596723,596752,596761,596780,596818,596819,597118,597135,597145,597690,598771,598772,598807,599227,599300,599464,599503,599567,600136,600144,600148,602222,602592,602997,603000,603230,603249,604041,604548,604549,604552,604702,604909,605836,609162,609296,609848,609990,610063,610746,612308,613562,613593,615223,615870,616438,616753,616783,617165,617436,617440,617631,618720,618936,619334,619345,619826,622237,624035,624334,624335,627468,627675,627832,627833,627835,628199,628849,629005,629500,630321,630583,631074,631141,633096,633174,633766,633846,634246,634435,634649,634951,635266,635414,635969,635971,636045,636454,636907,637131,637152,637180,637244,637251,637252,637964,638188,638644,638899,638901,639311,639405,639413,639601,639602,639605,639923,639926,639983,639986,639987,640001,640914,640961,641423,642631,642821,642826,642929,642930,642932,642933,642934,643624,643801,643893,643991,645541,645878,646030,646036,646361,646432,646538,646776,646821,646822,647862,647929,647972,647976,647987,647991,648186,648456,648458,648481,649564' --outputformat='%{bug_status}|%{component}|%{product}|%{bug_id}|%{short_desc}'

[lots of normal output truncated, then ...]

Traceback (most recent call last):
  File "/usr/bin/bugzilla", line 682, in <module>
    main()
  File "/usr/bin/bugzilla", line 608, in main
    print format_field_re.sub(bug_field,opt.outputformat)
  File "/usr/bin/bugzilla", line 602, in bug_field
    val = getattr(b,fieldname)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1208, in __getattr__
    self.refresh()
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1230, in refresh
    r = self.bugzilla._getbug(self.bug_id)
  File "/usr/lib/python2.7/site-packages/bugzilla/bugzilla3.py", line 69, in _getbug
    return self._getbugs([id])[0]
  File "/usr/lib/python2.7/site-packages/bugzilla/rhbugzilla.py", line 392, in _getbugs
    return [self._proxy.bugzilla.getBug(idlist[0])]
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1024, in single_request_with_cookies
    return self.parse_response(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response
    p.feed(data)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 26, column 13


Version-Release number of selected component (if applicable):

python-bugzilla-0.6.1-3.fc15.noarch

How reproducible:

100% with the full list of bugs.  Doesn't happen when I try
to cut the number of bugs down to just a few to see if a
particular bug was failing.

Steps to Reproduce:
1. Run the above command.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Richard W.M. Jones 2010-11-05 09:36:15 UTC
Shorter command which also fails:

bugzilla query -b '629005,629500,630321,630583,631074,631141,633096,633174,633766,633846,634246,634435,634649,634951,635266,635414,635969,635971,636045,636454,636907,637131,637152,637180,637244,637251,637252,637964,638188,638644,638899,638901,639311,639405,639413,639601,639602,639605,639923,639926,639983,639986,639987,640001,640914,640961,641423,642631,642821,642826,642929,642930,642932,642933,642934,643624,643801,643893,643991,645541,645878,646030,646036,646361,646432,646538,646776,646821,646822,647862,647929,647972,647976,647987,647991,648186,648456,648458,648481,649564' --outputformat='%{bug_status}|%{component}|%{product}|%{bug_id}|%{short_desc}'

Comment 2 Richard W.M. Jones 2010-11-05 09:38:50 UTC
Shorter command which fails:

bugzilla query -b '633766,633846,634246,634435,634649,634951,635266,635414,635969,635971,636045,636454' --outputformat='%{bug_status}|%{component}|%{product}|%{bug_id}|%{short_desc}'

Comment 3 Richard W.M. Jones 2010-11-05 09:41:23 UTC
Ah ha, it's a single bug which is causing the failure:

$ bugzilla query -b '635969' --outputformat='%{bug_status}|%{component}|%{product}|%{bug_id}|%{short_desc}'
Traceback (most recent call last):
  File "/usr/bin/bugzilla", line 682, in <module>
    main()
  File "/usr/bin/bugzilla", line 608, in main
    print format_field_re.sub(bug_field,opt.outputformat)
  File "/usr/bin/bugzilla", line 602, in bug_field
    val = getattr(b,fieldname)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1208, in __getattr__
    self.refresh()
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1230, in refresh
    r = self.bugzilla._getbug(self.bug_id)
  File "/usr/lib/python2.7/site-packages/bugzilla/bugzilla3.py", line 69, in _getbug
    return self._getbugs([id])[0]
  File "/usr/lib/python2.7/site-packages/bugzilla/rhbugzilla.py", line 392, in _getbugs
    return [self._proxy.bugzilla.getBug(idlist[0])]
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/site-packages/bugzilla/base.py", line 1024, in single_request_with_cookies
    return self.parse_response(response)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response
    p.feed(data)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 26, column 13

https://bugzilla.redhat.com/show_bug.cgi?id=635969

Comment 4 Will Woods 2011-05-31 19:17:44 UTC
The bugzilla server is handing us invalid XML; this is a bugzilla bug.

Comment 5 Simon Green 2011-07-26 23:48:51 UTC
Problem here is that Red Hat Bugzilla specific RPC calls (e.g. bugzilla.getBug) do not correct encode UTF-8 characters. The same call with Bug.get works fine.

Not sure how big a job it will be to change this, but will look into it.

Comment 11 Simon Green 2011-07-27 23:22:16 UTC
This is now ready for testing on https://partner-bugzilla.redhat.com/

Assuming there is no issues found, this should be released on the live server at 4pm Thursday (EDT), as part of Bugzilla 3.6.5011.

  -- simon

Comment 12 Richard W.M. Jones 2011-07-28 07:29:33 UTC
It appears to work from here:

$ bugzilla --bugzilla=https://partner-bugzilla.redhat.com/xmlrpc.cgi query -b '635969' --outputformat='%{bug_status}|%{component}|%{product}|%{bug_id}|%{short_desc}'
MODIFIED|['libguestfs']|Virtualization Tools|635969|glob echo mkfs ext2 /dev/vd[b-t]1 prints garbage

(versus an error if I remove the --bugzilla option).

Comment 13 Simon Green 2011-07-28 20:27:25 UTC
Hello,

This change was released into production approximately 30 minutes ago, as part of Red Hat Bugzilla 3.6.5011.

  -- simon

Comment 14 Simon Green 2012-05-01 03:54:19 UTC
*** Bug 461817 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.