Last modified: 2014-11-14 10:02:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71370, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69370 - Unhandled CircularRedirect exception in redirect.py
Unhandled CircularRedirect exception in redirect.py
Status: REOPENED
Product: Pywikibot
Classification: Unclassified
redirect.py (Other open bugs)
core-(2.0)
All All
: Normal normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-10 17:46 UTC by xqt
Modified: 2014-11-14 10:02 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description xqt 2014-08-10 17:46:45 UTC
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
Comment 1 Mpaa 2014-08-30 14:30:34 UTC
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)
Comment 2 John Mark Vandenberg 2014-11-14 09:58:29 UTC
per comment 1
Comment 3 John Mark Vandenberg 2014-11-14 10:02:55 UTC
Ah, the problem is that the exception occurred in a place that redirect.py doesnt handle it!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links