Author: arjunaraoc
Description:
Trying to save using -search or -filelinks is giving error (extract below)
arjun@arjun-945GCM-S2L:~/pwb/core$ python pwb.py replace.py -filelinks:CNREDDY.JPG -save:cnrtoc.txt "అ" "ఇ"
Traceback (most recent call last):
File "pwb.py", line 104, in <module> run_python_file(fn, args) File "pwb.py", line 49, in run_python_file exec compile(source, filename, "exec") in main_mod.__dict__ File "scripts/replace.py", line 696, in <module> main() File "scripts/replace.py", line 549, in main raise pywikibot.Error, 'require even number of replacements.'
pywikibot.exceptions.Error: require even number of replacements.
It is working with just the first search string. Looks like the documentation (link below) is outof date.
https://www.mediawiki.org/wiki/Manual:Pywikibot/replace.py#Example: Gathering articles
Version: core-(2.0)
Severity: enhancement