Bugs item #2765231, was opened at 2009-04-15 13:43 Message generated for change (Settings changed) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2765231...
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: Closed Resolution: Out of Date
Priority: 5 Private: No Submitted By: xqt (xqt)
Assigned to: xqt (xqt)
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%...] 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...]. 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...
pywikipedia-bugs@lists.wikimedia.org