Last modified: 2014-09-02 01:44:30 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/979/ Reported by: purodha Created on: 2009-07-15 14:19:03 Subject: selflink.py chokes - condition unclear Original description: python /home/purodha/pywikipedia/selflink.py -start:Hz -v Pywikipediabot \(r7065 \(wikipedia.py\), 2009/07/14, 19:34:51\) Python 2.5.2 \(r252:60911, Jan 4 2009, 21:59:32\) \[GCC 4.3.2\] Getting 60 pages from wikipedia:ksh... >>> HÖ \(Watt eßß datt?\) <<< No changes necessary. >>> Häijmat- un Kooshtallmusejum <<< No changes necessary. >>> Hämmche <<< No changes necessary. >>> Hängche <<< No changes necessary. >>> Hännesje <<< No changes necessary. >>> Hännesje Tiater <<< No changes necessary. >>> Häpi Änd <<< No changes necessary. >>> Hätz <<< No changes necessary. >>> Häädejraad \(Blëjshteff\) <<< Exception in Page constructor site=wikipedia:ksh, title=%231, insite=wikipedia:ksh, defaultNamespace=0 Traceback \(most recent call last\): File "/home/purodha/pywikipedia/selflink.py", line 249, in <module> main\(\) File "/home/purodha/pywikipedia/selflink.py", line 245, in main bot.run\(\) File "/home/purodha/pywikipedia/selflink.py", line 189, in run self.treat\(page\) File "/home/purodha/pywikipedia/selflink.py", line 168, in treat text, jumpToBeginning = self.handleNextLink\(page, text, match\) File "/home/purodha/pywikipedia/selflink.py", line 113, in handleNextLink linkedPage = wikipedia.Page\(page.site\(\), match.group\('title'\)\) File "/home/purodha/pywikipedia/wikipedia.py", line 456, in \_\_init\_\_ raise InvalidTitle\(u"Invalid title starting with a \#: '%s'" % t\) wikipedia.InvalidTitle: Invalid title starting with a \#: '\#1' purodha@nightshade:~/redir$
obviously this error happens when a link to section exists in the page (something like [[#section|label]]) so I tried to reproduce it, no success with both core and compat, I even tried link to section named "1" and It was okay. Since this bug reported FIVE years ago, probably fixed very long time ago and I close it