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

TASK DESCRIPTION
  **Command line:**
  
    python pwb.py cosmetic_changes -page:"قالب:Image label begin" -lang:ary
  
  **Output:**
  
    Retrieving 1 pages from wikipedia:ary.
    
    
    >>> قالب:Image label begin <<<
    
    0 pages read
    0 pages written
    0 pages skipped
    Execution time: 0 seconds
    Script terminated by exception:
    
    ERROR: AttributeError: 'str' object has no attribute 'formar'
    Traceback (most recent call last):
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 494, in <module>
        main()
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 478, in main
        if not execute():
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 462, in execute
        run_python_file(filename, script_args, module)
      File "C:\Users\Mohammed\Downloads\core\pwb.py", line 143, in 
run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File ".\scripts\cosmetic_changes.py", line 136, in <module>
        main()
      File ".\scripts\cosmetic_changes.py", line 132, in main
        bot.run()
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1592, in 
run
        self.treat(page)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\bot.py", line 1847, in 
treat
        self.treat_page()
      File ".\scripts\cosmetic_changes.py", line 89, in treat_page
        new_text = cc_toolkit.change(old_text)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\cosmetic_changes.py", 
line 301, in change
        new_text = self._change(text)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\cosmetic_changes.py", 
line 295, in _change
        text = self.safe_execute(method, text)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\cosmetic_changes.py", 
line 282, in safe_execute
        result = method(text)
      File "C:\Users\Mohammed\Downloads\core\pywikibot\cosmetic_changes.py", 
line 383, in standardizePageFooter
        text = textlib.replaceLanguageLinks(text, interwiki_links,
      File "C:\Users\Mohammed\Downloads\core\pywikibot\textlib.py", line 1190, 
in replaceLanguageLinks
        regexp = re.compile(r'{}\s*{}'.formar(includeOff, marker))
    AttributeError: 'str' object has no attribute 'formar'. Did you mean: 
'format'?
    CRITICAL: Exiting due to uncaught exception <class 'AttributeError'>
  
  **Output of version.py:**
  
    Pywikibot: [https] r-pywikibot-core (3368563, g15842, 2022/01/21, 10:45:42, 
OUTDATED)
    Release version: 7.0.0.dev0
    setuptools version: 60.5.0
    mwparserfromhell version: 0.6.3
    wikitextparser version: n/a
    requests version: 2.27.1
      cacerts: 
        certificate test: ok
    Python: 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 
bit (AMD64)]
  
  **Request:**
  
  - Please make the bot skip the page (and not crash) when encountering such 
error, as it wastes a lot of time to restart the bot each time it encounters 
this error (when running on a whole namespace). Thank you.

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

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