Meno25 created this task.
Meno25 added projects: Pywikibot, Pywikibot-Scripts.
Restricted Application added subscribers: pywikibot-bugs-list, alaa, Aklapper.

TASK DESCRIPTION
  **Command line:**
  
    python pwb.py fixing_redirects -lang:ary -page:"أوديت نارايان"
  
  **Output:**
  
    Script terminated by exception:
    
    ERROR: ValueError: Url: https://www.imdb.com/name/nm$1/
    Text / after the $1 placeholder is not supported (T111513).
    Traceback (most recent call last):
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 365, in <module>
        if not main():
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 357, in main
        run_python_file(filename,
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 73, in 
run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File ".\scripts\fixing_redirects.py", line 249, in <module>
        main()
      File ".\scripts\fixing_redirects.py", line 243, in main
        bot.run()
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1499, in 
run
        self.treat(page)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1780, in 
treat
        self.treat_page()
      File ".\scripts\fixing_redirects.py", line 191, in treat_page
        newtext = self.replace_links(newtext, page, target)
      File ".\scripts\fixing_redirects.py", line 78, in replace_links
        or mysite.isInterwikiLink(m.group('title'))
      File "C:\Users\Mohammed\Downloads\core\pywikibot\site\_basesite.py", line 
353, in isInterwikiLink
        linkfam, linkcode = pywikibot.Link(text, self).parse_site()
      File "C:\Users\Mohammed\Downloads\core\pywikibot\page\__init__.py", line 
5250, in parse_site
        newsite = self._source.interwiki(prefix)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\site\_apisite.py", line 
143, in interwiki
        return self._interwikimap[prefix].site
      File "C:\Users\Mohammed\Downloads\core\pywikibot\site\_interwikimap.py", 
line 78, in __getitem__
        raise self._iw_sites[prefix].site
      File "C:\Users\Mohammed\Downloads\core\pywikibot\site\_interwikimap.py", 
line 25, in site
        self._site = pywikibot.Site(
      File "C:\Users\Mohammed\Downloads\core\pywikibot\tools\__init__.py", line 
1649, in wrapper
        return obj(*__args, **__kw)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\__init__.py", line 1160, 
in Site
        code, fam = _code_fam_from_url(url, fam)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\__init__.py", line 1074, 
in _code_fam_from_url
        code = family.from_url(url)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\family.py", line 844, in 
from_url
        raise ValueError('Url: {}\nText {} after the $1 placeholder is '
    ValueError: Url: https://www.imdb.com/name/nm$1/
    Text / after the $1 placeholder is not supported (T111513).
    CRITICAL: Exiting due to uncaught exception <class 'ValueError'>
  
  **Request:**
  
  - 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 
<https://phabricator.wikimedia.org/rPWBC358a887c538af0b69fe6fbcbd57e52a30f777393>
 (T111513 <https://phabricator.wikimedia.org/T111513>) has a fix for this issue 
for `solve_disambiguation.py` Please implement the same fix for 
`fixing_redirects.py`

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

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

To: Meno25
Cc: Aklapper, alaa, Meno25, pywikibot-bugs-list, Shalomori123, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, 
Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to