Page MenuHomePhabricator

replace x imdbname interwiki
Closed, ResolvedPublic

Description

replace throws an error when replacing anything in an article with imdbname interwiki

Configuration
last commit of pwb core from gerrit, Python v3.5.2

Event Timeline

Traceback (most recent call last):
  File "pwb.py", line 257, in <module>
    if not main():
  File "pwb.py", line 251, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File "./scripts/replace.py", line 1131, in <module>
    main()
  File "./scripts/replace.py", line 1122, in main
    bot.run()
  File "./scripts/replace.py", line 772, in run
    callback=self._count_changes, quiet=True)
  File "/home/pavel/pywikibot/pywikibot/tools/__init__.py", line 1414, in wrapper
    return obj(*__args, **__kw)
  File "/home/pavel/pywikibot/pywikibot/page.py", line 1197, in save
    cc=apply_cosmetic_changes, quiet=quiet, **kwargs)
  File "/home/pavel/pywikibot/pywikibot/page.py", line 1205, in _save
    summary = self._cosmetic_changes_hook(summary) or summary
  File "/home/pavel/pywikibot/pywikibot/page.py", line 1255, in _cosmetic_changes_hook
    self.text = ccToolkit.change(old)
  File "/home/pavel/pywikibot/pywikibot/cosmetic_changes.py", line 270, in change
    new_text = self._change(text)
  File "/home/pavel/pywikibot/pywikibot/cosmetic_changes.py", line 264, in _change
    text = self.safe_execute(method, text)
  File "/home/pavel/pywikibot/pywikibot/cosmetic_changes.py", line 251, in safe_execute
    result = method(text)
  File "/home/pavel/pywikibot/pywikibot/cosmetic_changes.py", line 616, in cleanUpLinks
    'startspace'])
  File "/home/pavel/pywikibot/pywikibot/textlib.py", line 362, in replaceExcept
    replacement = new(match)
  File "/home/pavel/pywikibot/pywikibot/cosmetic_changes.py", line 501, in handleOneLink
    if not self.site.isInterwikiLink(titleWithSection):
  File "/home/pavel/pywikibot/pywikibot/site.py", line 1110, in isInterwikiLink
    linkfam, linkcode = pywikibot.Link(text, self).parse_site()
  File "/home/pavel/pywikibot/pywikibot/page.py", line 5006, in parse_site
    newsite = self._source.interwiki(prefix)
  File "/home/pavel/pywikibot/pywikibot/site.py", line 944, in interwiki
    return self._interwikimap[prefix].site
  File "/home/pavel/pywikibot/pywikibot/site.py", line 700, in __getitem__
    raise self._iw_sites[prefix].site
ValueError: Text after the $1 placeholder is not supported (T111513).
<type 'exceptions.ValueError'>
CRITICAL: Closing network session.
Xqt triaged this task as High priority.Jul 17 2016, 12:58 PM
Xqt added a project: Pywikibot.

Change 322398 had a related patch set uploaded (by Matěj Suchánek):
Workaround for T111513

https://gerrit.wikimedia.org/r/322398

matej_suchanek claimed this task.
matej_suchanek removed a project: Patch-For-Review.

Scripts should no longer fail but the actual problem hasn't been solved yet, see the parent task.