Page MenuHomePhabricator

reflinks.py: unknown encoding: win1251
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

Found 1 wikipedia:ru processes running, including this one.
Retrieving 50 pages from wikipedia:ru.
WARNING: Unknown or invalid encoding 'win-1251'
Dropped throttle(s).

1 read operation
Execution time: 2 seconds
Read operation time: 2.0 seconds
Script terminated by exception:

ERROR: unknown encoding: win-1251 (LookupError)
Traceback (most recent call last):
  File "/data/project/rubin16/pywikibot-core/pwb.py", line 488, in <module>
    main()
  File "/data/project/rubin16/pywikibot-core/pwb.py", line 472, in main
    if not execute():
  File "/data/project/rubin16/pywikibot-core/pwb.py", line 455, in execute
    run_python_file(filename, script_args, module)
  File "/data/project/rubin16/pywikibot-core/pwb.py", line 142, in run_python_file
    main_mod.__dict__)
  File "/data/project/rubin16/pywikibot-core/scripts/reflinks.py", line 799, in <module>
    main()
  File "/data/project/rubin16/pywikibot-core/scripts/reflinks.py", line 795, in main
    bot.run()
  File "/mnt/nfs/labstore-secondary-tools-project/rubin16/pywikibot-core/pywikibot/bot.py", line 1663, in run
    self.treat(page)
  File "/data/project/rubin16/pywikibot-core/scripts/reflinks.py", line 664, in treat
    tag = meta_content.group().decode(enc)
LookupError: unknown encoding: win-1251
Closing network session.
CRITICAL: Exiting due to uncaught exception <class 'LookupError'>
Network session closed.

What should have happened instead?:
No crash happens