Bugs item #2675814, was opened at 2009-03-09 18:46
Message generated for change (Comment added) made by nicdumz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2675814&group_id=93107

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: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: SyntaxError: undefined entity  : line 14789, column 89

Initial Comment:
When I run "python redirect.py double", after the first redirect gets fixed, I 
get:

Changing page [[My article name]]
Traceback (most recent call last):
  File "redirect.py", line 840, in <module>
    main()
  File "redirect.py", line 836, in main
    bot.run()
  File "redirect.py", line 757, in run
    self.fix_double_redirects()
  File "redirect.py", line 611, in fix_double_redirects
    self.fix_1_double_redirect(mysite, redir_name, summary)
  File "redirect.py", line 707, in fix_1_double_redirect
    redir.put(text)
  File "c:\temp\pywikipedia\wikipedia.py", line 1419, in put
    newPage, self.site().getToken(sysop = sysop), sysop = sysop)
  File "c:\temp\pywikipedia\wikipedia.py", line 1549, in _putPage
    if self.site().has_mediawiki_message("spamprotectiontitle")\
  File "c:\temp\pywikipedia\wikipedia.py", line 4983, in has_mediawiki_message
    v = self.mediawiki_message(key)
  File "c:\temp\pywikipedia\wikipedia.py", line 4951, in mediawiki_message
    tree = XML(decode)
  File "<string>", line 85, in XML
SyntaxError: undefined entity &nbsp;: line 14789, column 89

Likewise for "python category.py move -from:"name" -to:"name2":

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 "c:\temp\pywikipedia\catlib.py", line 506, in change_category
    article.put(text, comment)
  File "c:\temp\pywikipedia\wikipedia.py", line 1419, in put
    newPage, self.site().getToken(sysop = sysop), sysop = sysop)
  File "c:\temp\pywikipedia\wikipedia.py", line 1549, in _putPage
    if self.site().has_mediawiki_message("spamprotectiontitle")\
  File "c:\temp\pywikipedia\wikipedia.py", line 4983, in has_mediawiki_message
    v = self.mediawiki_message(key)
  File "c:\temp\pywikipedia\wikipedia.py", line 4951, in mediawiki_message
    tree = XML(decode)
  File "<string>", line 85, in XML
SyntaxError: undefined entity &nbsp;: line 14789, column 89


Output of version.py:

Pywikipedia [http] trunk/pywikipedia (r6503, Mar 09 2009, 14:43:57)
Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)]



----------------------------------------------------------------------

>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-03-10 01:19

Message:
I know this bug =)

Can you double-check index.php?title=Special:AllMessages&ot=xml for us ?
I'm pretty sure that your browser will output the same error. The last time
I saw this bug, firefox was confused too.

Then, check the source of the page. I think that the first line will be an
empty line. If it is, the XML is non-standard. The first line should be
something like <?xml version="1.0" encoding="utf-8" ?>

Check your mediawiki extensions, one of them is, I think, inserting a new
line everytime that index.php is called. This is okay for HTML, but this is
wrong for XML. (To check which one is doing that, disable all extensions,
and activate them one by one, until the behavior is triggerred. Please
report the bugged extension so I can fix it in Mediawiki SVN, or file a bug
report to their authors...)

----------------------------------------------------------------------

Comment By: Daniel Barrett (djbarrett)
Date: 2009-03-09 21:43

Message:
[[MediaWiki:Spamprotectiontitle]] contains only the default text:

Spam protection filter

----------------------------------------------------------------------

Comment By: Russell Blau (russblau)
Date: 2009-03-09 21:19

Message:
Probably you want to escape the "undefined entity" by changing "&nbsp;" to
"&amp;nbsp;" in the text on [[MediaWiki:Spamprotectiontitle]].


----------------------------------------------------------------------

Comment By: Daniel Barrett (djbarrett)
Date: 2009-03-09 20:36

Message:
This is on our own MediaWiki site, running 1.11.0.

How can I provide you with the source text?

----------------------------------------------------------------------

Comment By: Russell Blau (russblau)
Date: 2009-03-09 19:50

Message:
What site does this occur on?  It could be a problem with the site's
formatting of the message, or it could be in the XML parser.  We need to
see the source text to know which.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2675814&group_id=93107

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to