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 cosmetic_changes -page:"ويكيبيديا:Category handler" -lang:arz
  
  **Output:**
  
    >>> ويكيبيديا:Category handler <<<
    
    0 pages read
    0 pages written
    0 pages skipped
    Execution time: 1 seconds
    Script terminated by exception:
    
    ERROR: InvalidPageError: Page [[arz:ويكيبيديا:Category handler]] is invalid.
    Traceback (most recent call last):
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 423, in <module>
        if not main():
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 415, in main
        run_python_file(filename,
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 112, in 
run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File ".\scripts\cosmetic_changes.py", line 125, in <module>
        main()
      File ".\scripts\cosmetic_changes.py", line 121, in main
        bot.run()
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1585, in 
run
        self.treat(page)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1840, in 
treat
        self.treat_page()
      File ".\scripts\cosmetic_changes.py", line 78, in treat_page
        changed_text = cc_toolkit.change(self.current_page.text)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\page\__init__.py", line 
569, in text
        return self.get(get_redirect=True)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\page\__init__.py", line 
441, in get
        return self.latest_revision.text
      File "C:\Users\Mohammed\Downloads\core\pywikibot\page\__init__.py", line 
556, in latest_revision
        raise InvalidPageError(self)
    pywikibot.exceptions.InvalidPageError: Page [[arz:ويكيبيديا:Category 
handler]] is invalid.
    CRITICAL: Exiting due to uncaught exception <class 
'pywikibot.exceptions.InvalidPageError'>
  
  **Request:**
  
  Please make the bot skip such pages (i.e. not break the bot run) when it 
encounters such pages. Thank you.
  
  **Notes:**
  
  - This task is similar to T280043: replace.py: uncaught exception <class 
'StopIteration'> <https://phabricator.wikimedia.org/T280043>
  - The fix was implemented in rPWBC9367c620c811b43af6689e023e97a0884b1ac789 
<https://phabricator.wikimedia.org/rPWBC9367c620c811b43af6689e023e97a0884b1ac789>
  - The request here is to implement the same fix for `cosmetic_changes.py`

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

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

To: Meno25
Cc: Aklapper, alaa, pywikibot-bugs-list, Meno25, 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