https://bugzilla.wikimedia.org/show_bug.cgi?id=72527
Bug ID: 72527 Summary: CircularRedirect exception throws another exception Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: russblau@hotmail.com Web browser: --- Mobile Platform: ---
For testing, a creating a sandbox page that redirects to itself:
s = pywikibot.Site() p = pywikibot.Page(s, "User:R'n'B/sandbox") p.getRedirectTarget()
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/shared/pywikipedia/rewrite/pywikibot/page.py", line 1361, in getRedirec tTarget return self.site.getredirtarget(self) File "/shared/pywikipedia/rewrite/pywikibot/site.py", line 2347, in getredirta rget raise pywikibot.CircularRedirect(target_title) File "/shared/pywikipedia/rewrite/pywikibot/exceptions.py", line 99, in __init __ self.title = page.title(asLink=True) TypeError: title() takes no keyword arguments
I don't understand the cause here, since page.title(asLink=True) works fine in other contexts.