https://bugzilla.wikimedia.org/show_bug.cgi?id=63569
Bug ID: 63569 Summary: redirect.py should process CircularRedirect exception silently instead of break the script Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: redirect.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: info@gno.de Web browser: --- Mobile Platform: ---
C:\pwb\core>pwb.py redirect double -moves -total:500 -always -lang:en
.Page [[Portuguese Association of Ryerson]] saved .........Traceback (most recent call last): File "C:\pwb\core\pwb.py", line 143, in <module> run_python_file(fn, argv, argvu) File "C:\pwb\core\pwb.py", line 67, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "C:\pwb\core\scripts\redirect.py", line 824, in <module> main() File "C:\pwb\core\scripts\redirect.py", line 820, in main bot.run() File "C:\pwb\core\scripts\redirect.py", line 732, in run self.fix_double_redirects() File "C:\pwb\core\scripts\redirect.py", line 536, in fix_double_redirects for redir_name in self.generator.retrieve_double_redirects(): File "C:\pwb\core\scripts\redirect.py", line 307, in retrieve_double_redirects
for redir_page in gen: File "C:\pwb\core\scripts\redirect.py", line 367, in get_moved_pages_redirects
redirectsOnly=True): File "C:\pwb\core\pywikibot\page.py", line 680, in getReferences content=content File "C:\pwb\core\pywikibot\site.py", line 1674, in pagereferences namespaces=namespaces, step=step, content=content), File "C:\pwb\core\pywikibot\site.py", line 1622, in pagebacklinks if redir.getRedirectTarget() == page: File "C:\pwb\core\pywikibot\page.py", line 1201, in getRedirectTarget return self.site.getredirtarget(self) File "C:\pwb\core\pywikibot\site.py", line 1476, in getredirtarget raise pywikibot.CircularRedirect(redirmap[title]) pywikibot.exceptions.CircularRedirect: Talk:Green Party Korea <class 'pywikibot.exceptions.CircularRedirect'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
C:\pwb\core>pwb.py version WARNING: Configuration variable 'account_global' is defined but unknown. Misspelled? WARNING: Configuration variable 'use_diskcache' is defined but unknown. Misspelled? WARNING: Configuration variable 'notify_unflagged_bot' is defined but unknown. Misspelled? Pywikibot: pywikibot-core (2c735d1, s3944, 2014/03/31, 21:29:43, ok) Release version: 2.0b1 Python: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] unicode test: ok