Page MenuHomePhabricator uncaught exception <class 'ValueError'>
Closed, ResolvedPublic


Command line:

python fixing_redirects -lang:ary -page:"أوديت نارايان"


Script terminated by exception:

ERROR: ValueError: Url:$1/
Text / after the $1 placeholder is not supported (T111513).
Traceback (most recent call last):
  File "C:\Users\Mohammed\Downloads\core\", line 365, in <module>
    if not main():
  File "C:\Users\Mohammed\Downloads\core\", line 357, in main
  File "C:\Users\Mohammed\Downloads\core\", line 73, in run_python_file
    exec(compile(source, filename, 'exec', dont_inherit=True),
  File ".\scripts\", line 249, in <module>
  File ".\scripts\", line 243, in main
  File "C:\Users\Mohammed\Downloads\core\pywikibot\", line 1499, in run
  File "C:\Users\Mohammed\Downloads\core\pywikibot\", line 1780, in treat
  File ".\scripts\", line 191, in treat_page
    newtext = self.replace_links(newtext, page, target)
  File ".\scripts\", line 78, in replace_links
    or mysite.isInterwikiLink('title'))
  File "C:\Users\Mohammed\Downloads\core\pywikibot\site\", line 353, in isInterwikiLink
    linkfam, linkcode = pywikibot.Link(text, self).parse_site()
  File "C:\Users\Mohammed\Downloads\core\pywikibot\page\", line 5250, in parse_site
    newsite = self._source.interwiki(prefix)
  File "C:\Users\Mohammed\Downloads\core\pywikibot\site\", line 143, in interwiki
    return self._interwikimap[prefix].site
  File "C:\Users\Mohammed\Downloads\core\pywikibot\site\", line 78, in __getitem__
    raise self._iw_sites[prefix].site
  File "C:\Users\Mohammed\Downloads\core\pywikibot\site\", line 25, in site
    self._site = pywikibot.Site(
  File "C:\Users\Mohammed\Downloads\core\pywikibot\tools\", line 1649, in wrapper
    return obj(*__args, **__kw)
  File "C:\Users\Mohammed\Downloads\core\pywikibot\", line 1160, in Site
    code, fam = _code_fam_from_url(url, fam)
  File "C:\Users\Mohammed\Downloads\core\pywikibot\", line 1074, in _code_fam_from_url
    code = family.from_url(url)
  File "C:\Users\Mohammed\Downloads\core\pywikibot\", line 844, in from_url
    raise ValueError('Url: {}\nText {} after the $1 placeholder is '
ValueError: Url:$1/
Text / after the $1 placeholder is not supported (T111513).
CRITICAL: Exiting due to uncaught exception <class 'ValueError'>

Output of

Pywikibot: [https] r-pywikibot-core (5aa31e3, g14908, 2021/05/22, 07:29:53, OUTDATED)
Release version: 6.2.0.dev0
requests version: 2.25.1
    certificate test: ok
Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)]


  • Please make the bot skip (and not crash) when encountering such exceptions. This is to save the the time of manually restarting the bot every time it crashes.
  • rPWBC358a887c538af0b69fe6fbcbd57e52a30f777393 has a fix for this issue for Please implement the same fix for

Event Timeline

Change 693651 had a related patch set uploaded (by Meno25; author: Meno25):

[pywikibot/core@master] Ignore ValueError

Change 693651 merged by jenkins-bot:

[pywikibot/core@master] Ignore ValueError

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