Bugs item #2590324, was opened at 2009-02-11 21:02 Message generated for change (Settings changed) made by nicdumz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2590324...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: raven24 (raven24) Assigned to: Nobody/Anonymous (nobody)
Summary: not well-formed XML (invalid token)
Initial Comment: Seems to me like an error while trying to parse the mediawiki messages...
My Version: Pywikipedia [http] trunk/pywikipedia (r6338, Feb 08 2009, 13:58:13) Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) [GCC 4.3.2]
Traceback (most recent call last): File "category.py", line 974, in <module> bot.run() File "category.py", line 446, in run comment=self.editSummary, inPlace=self.inPlace) File "/home/florian/Share/Code/pywikipedia/catlib.py", line 506, in change_category article.put(text, comment) File "/home/florian/Share/Code/pywikipedia/wikipedia.py", line 1416, in put newPage, self.site().getToken(sysop = sysop), sysop = sysop) File "/home/florian/Share/Code/pywikipedia/wikipedia.py", line 1546, in _putPage if self.site().has_mediawiki_message("spamprotectiontitle")\ File "/home/florian/Share/Code/pywikipedia/wikipedia.py", line 4953, in has_mediawiki_message v = self.mediawiki_message(key) File "/home/florian/Share/Code/pywikipedia/wikipedia.py", line 4921, in mediawiki_message tree = XML(decode) File "<string>", line 85, in XML SyntaxError: not well-formed (invalid token): line 1, column 1
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-14 18:33
Message: This was due to some mediawiki extensions adding white lines in top of generated XML, which makes the XML invalid.
The obvious solution is to fix your installation to remove that empty line.
We, however, have also "fixed" the issue on the pywikipedia side, to remove the headers before parsing the XML.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2590324...