Page MenuHomePhabricator

UnicodeDecodeError indicating a RuntimeError in redirect.py
Closed, DuplicatePublic

Description

Retrieving 8 pages from wikipedia:ar.


>>> قائمة فوربس للمليارديرات <<<
ERROR: RuntimeError: getredirtarget: No 'redirects' found for page قائمة فوربس ل
لمليارديرات.
Traceback (most recent call last):
  File "C:\pwb\core\pwb.py", line 256, in <module>
    if not main():
  File "C:\pwb\core\pwb.py", line 250, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "C:\pwb\core\pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\redirect.py", line 911, in <module>
    main()
  File ".\scripts\redirect.py", line 898, in main
    bot.run()
  File ".\scripts\redirect.py", line 765, in run
    self.fix_double_redirects()
  File ".\scripts\redirect.py", line 587, in fix_double_redirects
    self.fix_1_double_redirect(redir_name)
  File ".\scripts\redirect.py", line 604, in fix_1_double_redirect
    targetPage = newRedir.getRedirectTarget()
  File "C:\pwb\core\pywikibot\page.py", line 1550, in getRedirectTarget
    return self.site.getredirtarget(self)
  File "C:\pwb\core\pywikibot\site.py", line 3025, in getredirtarget
    % title)  # UnicodeDecodeError: ascii can't decode byte 0xe0 in position 0:
ordinal not in range(128)
RuntimeError
<type 'exceptions.RuntimeError'>
CRITICAL: Closing network session.

Event Timeline

Xqt created this task.Feb 28 2016, 9:45 AM
Xqt closed this task as Resolved.Feb 28 2016, 9:46 AM
Xqt triaged this task as High priority.
Xqt added a comment.EditedFeb 28 2016, 11:34 AM

Substituting the repr doesn't raise UnicodeDecodeError, i.e. "Errormessage %r" % title