Xqt added a comment.

This still happens with python 2:

C:\pwb\GIT\core>py -2 pwb.py redirect -lang:tg do -simulate

Retrieving double redirect special page...
Retrieving 24 pages from wikipedia:tg.


>>> 29 Сентябр <<<
ERROR: Page [[tg:29 Сентябр]] is a circular redirect.
Skipping [[tg:29 Сентябр]].


>>> Лоиҳа:Тоҷикистон <<<

1 pages read
0 pages written
Execution time: 2 seconds
Read operation time: 2 seconds
Script terminated by exception:

ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: o
rdinal not in range(128)
Traceback (most recent call last):
  File "pwb.py", line 253, in <module>
    if not main():
  File "pwb.py", line 246, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 115, in run_python_file
    main_mod.__dict__)
  File ".\scripts\redirect.py", line 806, in <module>
    main()
  File ".\scripts\redirect.py", line 802, in main
    bot.run()
  File "C:\pwb\GIT\core\pywikibot\bot.py", line 1505, in run
    self.treat(page)
  File "C:\pwb\GIT\core\pywikibot\bot.py", line 1737, in treat
    self.treat_page()
  File ".\scripts\redirect.py", line 715, in treat_page
    self.action_treat(self.current_page)
  File ".\scripts\redirect.py", line 585, in fix_1_double_redirect
    targetPage = newRedir.getRedirectTarget()
  File "C:\pwb\GIT\core\pywikibot\page.py", line 1668, in getRedirectTarget
    return self.site.getredirtarget(self)
  File "C:\pwb\GIT\core\pywikibot\site.py", line 3208, in getredirtarget
    % title.encode(self.encoding()))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal
not in range(128)
<type 'exceptions.UnicodeDecodeError'>
CRITICAL: Closing network session.

C:\pwb\GIT\core>

TASK DETAIL
https://phabricator.wikimedia.org/T126192

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Xqt
Cc: jayvdb, Ladsgroup, Legoktm, valhallasw, Aklapper, Xqt, pywikibot-bugs-list, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to