Meno25 added a comment.

  - Just a note that this issue occurs also using the script 
`fixing_redirects.py`. The bot run crashes and I have to restart it manually.
  - This time the page that crashes the bot (i.e. page exists with no history) 
is arz:قالب:Citation/CS1 
<https://arz.wikipedia.org/w/index.php?title=%D9%82%D8%A7%D9%84%D8%A8:Citation/CS1&action=history>
  
  **Command line:**
  
    python pwb.py fixing_redirects -lang:arz -start:Template:!
  
  **Output:**
  
    Script terminated by exception:
    
    ERROR: StopIteration:
    Traceback (most recent call last):
      File "C:\Users\Mohammed\core\pwb.py", line 364, in <module>
        if not main():
      File "C:\Users\Mohammed\core\pwb.py", line 356, in main
        run_python_file(filename,
      File "C:\Users\Mohammed\core\pwb.py", line 74, in run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File ".\scripts\fixing_redirects.py", line 232, in <module>
        main()
      File ".\scripts\fixing_redirects.py", line 226, in main
        bot.run()
      File "C:\Users\Mohammed\core\pywikibot\bot.py", line 1495, in run
        self.treat(page)
      File "C:\Users\Mohammed\core\pywikibot\bot.py", line 1774, in treat
        self.treat_page()
      File ".\scripts\fixing_redirects.py", line 163, in treat_page
        newtext = self.current_page.text
      File "C:\Users\Mohammed\core\pywikibot\page\__init__.py", line 560, in 
text
        return self.get(get_redirect=True)
      File "C:\Users\Mohammed\core\pywikibot\tools\__init__.py", line 1667, in 
wrapper
        return obj(*new_args, **new_kwargs)
      File "C:\Users\Mohammed\core\pywikibot\page\__init__.py", line 434, in get
        return self.latest_revision.text
      File "C:\Users\Mohammed\core\pywikibot\page\__init__.py", line 547, in 
latest_revision
        return next(self.revisions(content=True, total=1))
    StopIteration
    CRITICAL: Exiting due to uncaught exception <class 'StopIteration'>
  
  **Output of version.py:**
  
    Pywikibot: [https] r-pywikibot-core (f2c1be5, g14694, 2021/04/18, 17:40:50, 
master)
    Release version: 6.1.1.dev0
    requests version: 2.25.1
        certificate test: ok
    Python: 3.9.4 (tags/v3.9.4:1f2e308, Apr  4 2021, 13:27:16) [MSC v.1928 64 
bit (AMD64)]
  
  So, @Xqt, could you, please, make the two scripts `replace.py` and 
`fixing_redirects.py` skip such pages without crashing? We have a bunch of such 
pages on Arabic wikis and it is painful for me to restart the bot every time it 
crashes. Thanks.

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

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

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

Reply via email to