Xqt created this task.
Xqt added projects: Pywikibot-core, Pywikibot-textlib.py.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION

Using a group reference in the second pair of the replacement regex but don't have a group in the first the method should raise an IndexError but it raises a TypeError due to a wrong string assignment:

Invalid group reference: 1
Traceback (most recent call last):
  File "C:\pwb\GIT\core\pwb.py", line 255, in <module>
    if not main():
  File "C:\pwb\GIT\core\pwb.py", line 249, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "C:\pwb\GIT\core\pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\replace.py", line 1164, in <module>
    main()
  File ".\scripts\replace.py", line 1155, in main
    bot.run()
  File ".\scripts\replace.py", line 744, in run
    page)
  File ".\scripts\replace.py", line 648, in apply_replacements
    allowoverlap=self.allowoverlap, site=self.site)
  File "C:\pwb\GIT\core\pywikibot\textlib.py", line 407, in replaceExcept
    pywikibot.output('Groups found:\n%s' % match.groups())
TypeError: not enough arguments for format string
<type 'exceptions.TypeError'>
CRITICAL: Closing network session.

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

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

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

Reply via email to