[Pywikipedia-l] [ pywikipediabot-Bugs-2765231 ] Cosmetic_changes: Empty Selflink Error

SourceForge.net noreply at sourceforge.net
Wed Apr 15 11:43:59 UTC 2009


Bugs item #2765231, was opened at 2009-04-15 13:43
Message generated for change (Tracker Item Submitted) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2765231&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: other
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: xqt (xqt)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cosmetic_changes: Empty Selflink Error

Initial Comment:
__version__ = '$Id: cosmetic_changes.py 6285 2009-01-23 14:32:00Z siebrand $'
trunk/pywikipedia (r6602)
Python 2.5.2 r252:60911

Running interwiki.py with cosmetic_changes, wikipedia.Page raises an Error "Can't have an empty self-link". I found this error on the page [http://wuu.wikipedia.org/wiki/%E5%90%84%E5%8F%AA%E8%A8%80%E8%AF%9D%E7%BB%B4%E5%9F%BA%E7%8A%B6%E5%86%B5%E5%A4%A7%E8%A7%82] and I fixed the correspondig link [http://wuu.wikipedia.org/w/index.php?title=%E5%90%84%E5%8F%AA%E8%A8%80%E8%AF%9D%E7%BB%B4%E5%9F%BA%E7%8A%B6%E5%86%B5%E5%A4%A7%E8%A7%82&diff=92623&oldid=77338]. However it would be better to install an exception error handling for this matter.

File interwiki.py, line 1860 in (module) - bot.run()
File interwiki.py, line 1575 in run - self.queryStep()
File interwiki.py, line 1554 in queryStep - subj.finish(self)
File interwiki.py, line 1147 in finish - if self.replaceLinks(page, new, bot):
File interwiki.py, line 1290 in replaceLinks - status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File wikipedia.py, line in put - newtext = ccToolkit.change(newtext)
File cosmetic_changes.py, line 106 in change - text = self.cleanUpLinks(text)
File cosmetic_changes.py, line 275 in cleanUpLinks - text = wikipedia.replaceExcept(text, linkR, handleOneLink, ['comment', 'math', 'nowiki', 'pre', 'startspace'])
File wikipedia.py, line in replaceExcept - replacement = new(match)
File cosmetic_changes.py, line 187 in handleOneLink - page = wikioedia.Page(self.sie, titleWithSection)
File wikipedia.py, line 407 in __init__ - raise Error("Can't have an empty self-link")
wikipedia.Error: Can't have an empty self-link

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

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



More information about the Pywikipedia-l mailing list