Bugs item #2981290, was opened at 2010-04-02 21:41 Message generated for change (Comment added) made by xqt You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2981290...
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: masti (masti01) Assigned to: xqt (xqt) Summary: selflink.py crashes with invalid.title exception
Initial Comment: selflink.py crashes on several pages on pl.wikipedia:
$ python selflink.py -start:"9797 Raes" Getting 60 pages from wikipedia:pl...
9797 Raes <<<
Traceback (most recent call last): File "selflink.py", line 252, in <module> main() File "selflink.py", line 248, in main bot.run() File "selflink.py", line 192, in run self.treat(page) File "selflink.py", line 171, in treat text, jumpToBeginning = self.handleNextLink(page, text, match) File "selflink.py", line 116, in handleNextLink linkedPage = wikipedia.Page(page.site(), match.group('title')) File "/usr/home/masti/pw/pywikipedia/wikipedia.py", line 313, in __init__ raise InvalidTitle(u"Invalid title '%s'" % title ) pywikibot.exceptions.InvalidTitle: Invalid title ' ' masti@wikimedia ~/pw/pywikipedia $ python version.py Pywikipedia [http] trunk/pywikipedia (r8050, 2010/04/01, 15:43:14) Python 2.6.2 (r262:71600, Oct 22 2009, 08:54:52) [GCC 4.3.4]
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-04-06 09:55
Message: done in r8056
----------------------------------------------------------------------
Comment By: masti (masti01) Date: 2010-04-03 10:48
Message: So it could be that this part of article: 'Odkryta [[ ]] [[]] roku.' with empty titles throws exception. But the script should handle it by skipping it and not stopping.
----------------------------------------------------------------------
Comment By: xqt (xqt) Date: 2010-04-03 10:06
Message: This script founds a invalid (empty) title and raises the error. What is wrong with this behavior? I guess that's right.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2981290...