Page MenuHomePhabricator

Unhandled CircularRedirect exception in redirect.py
Closed, ResolvedPublic

Description

redirect.py get an unexpected CircularRedirect exception:

User:EvanBlass/sandbox <<<

Links to: [[Draft:Evan Blass]].
Links to: [[Evan Blass]].
  • #REDIRECT [[Draft:Evan Blass]]

+ #REDIRECT [[Evan Blass]]

.Page [[User:EvanBlass/sandbox]] saved
..Traceback (most recent call last):

File "C:\pwb\core\pwb.py", line 171, in <module>
  run_python_file(fn, argv, argvu)
File "C:\pwb\core\pwb.py", line 69, in run_python_file
  exec(compile(source, filename, "exec"), main_mod.__dict__)
File "C:\pwb\core\scripts\redirect.py", line 820, in <module>
  main()
File "C:\pwb\core\scripts\redirect.py", line 817, in main
  bot.run()
File "C:\pwb\core\scripts\redirect.py", line 726, in run
  self.fix_double_redirects()
File "C:\pwb\core\scripts\redirect.py", line 535, in fix_double_redirects
  for redir_name in self.generator.retrieve_double_redirects():
File "C:\pwb\core\scripts\redirect.py", line 305, in retrieve_double_redirects

  for redir_page in gen:
File "C:\pwb\core\scripts\redirect.py", line 365, in get_moved_pages_redirects

  redirectsOnly=True):
File "C:\pwb\core\pywikibot\page.py", line 770, in getReferences
  content=content
File "C:\pwb\core\pywikibot\site.py", line 1997, in pagereferences
  namespaces=namespaces, step=step, content=content),
File "C:\pwb\core\pywikibot\site.py", line 1946, in pagebacklinks
  if redir.getRedirectTarget() == page:
File "C:\pwb\core\pywikibot\page.py", line 1322, in getRedirectTarget
  return self.site.getredirtarget(self)
File "C:\pwb\core\pywikibot\site.py", line 1800, in getredirtarget
  raise pywikibot.CircularRedirect(target_title)

pywikibot.exceptions.CircularRedirect: Page User talk:Belam is a circular redire
ct.
<class 'pywikibot.exceptions.CircularRedirect'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort


Version: core-(2.0)
Severity: normal

Details

Reference
bz69370

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:36 AM
bzimport set Reference to bz69370.
bzimport added a subscriber: Unknown Object (????).

Isn't it the expectd behaviour?

The page was actually redirecting to itself.

https://en.wikipedia.org/w/index.php?title=User_talk:Belam&action=history
(removed invalid redirect (redirect to self)

Ah, the problem is that the exception occurred in a place that redirect.py doesnt handle it!

Mpaa claimed this task.