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

TASK DESCRIPTION
  **Command line:**
  
    python3 pwb.py fixing_redirects -lang:ar -family:wikiversity 
-start:Template:!
  
  **Output:**
  
    ERROR: RuntimeError: getredirtarget: No 'redirects' found for page 
موضوع:علم المواد.
    Traceback (most recent call last):
      File "pwb.py", line 363, in <module>
        if not main():
      File "pwb.py", line 358, in main
        file_package)
      File "pwb.py", line 75, in run_python_file
        main_mod.__dict__)
      File "./scripts/fixing_redirects.py", line 223, in <module>
        main()
      File "./scripts/fixing_redirects.py", line 217, in main
        bot.run()
      File 
"/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 
1487, in run
        self.treat(page)
      File 
"/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 
1766, in treat
        self.treat_page()
      File "./scripts/fixing_redirects.py", line 147, in treat_page
        target = page.getRedirectTarget()
      File 
"/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/page/__init__.py",
 line 1646, in getRedirectTarget
        return self.site.getredirtarget(self)
      File 
"/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/site/__init__.py",
 line 2494, in getredirtarget
        .format(title))
    RuntimeError: getredirtarget: No 'redirects' found for page موضوع:علم 
المواد.
    CRITICAL: Exiting due to uncaught exception <class 'RuntimeError'>
  
  **Problem:**
  
  - When running the script ` fixing_redirects.py`, the bot crashes when 
encountering the above error.
  - This is annoying as I have to manually restart the bot again.
  
  **Notes:**
  
  - I believe that this error is very similar to T130911: redirect.py fails for 
RuntimeError <https://phabricator.wikimedia.org/T130911> but note that T130911 
<https://phabricator.wikimedia.org/T130911> is for the script `redirect.py` 
while this task is for the script `fixing_redirects.py`
  - In  T130911 <https://phabricator.wikimedia.org/T130911>, there is a fix 
that solved this problem for `redirect.py`
  
  rPWBC9bdddaa7be5d818aa54dd45a68861151e63ba172 
<https://phabricator.wikimedia.org/rPWBC9bdddaa7be5d818aa54dd45a68861151e63ba172>
  
  **Request:**
  
  Please implement the same fix for `fixing_redirects.py` (i.e. make the bot 
skip the page in this case instead of crashing). Thank you.

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

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

To: Meno25
Cc: Aklapper, alanajjar, pywikibot-bugs-list, Meno25, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to