Command line:
python pwb.py replace -fix:HTML -site:wikinews:ar -page:User_talk:Madedy
Output:
Retrieving 1 pages from wikinews:ar. 0 pages read 0 pages written 0 pages skipped Execution time: 1 seconds Script terminated by exception: ERROR: StopIteration: Traceback (most recent call last): File "C:\Users\Mohammed\core\pwb.py", line 363, in <module> if not main(): File "C:\Users\Mohammed\core\pwb.py", line 355, 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\replace.py", line 1098, in <module> main() File ".\scripts\replace.py", line 1090, in main bot.run() File "C:\Users\Mohammed\core\pywikibot\bot.py", line 1495, in run self.treat(page) File ".\scripts\replace.py", line 678, in treat original_text = 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 1642, 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'>
Notes:
- This exception happened when the bot was processing n:ar:نقاش المستخدم:Madedy, a page that exists but has no history.
- Another example of a page that stops the bot run (i.e. a page that exists but has no history) is n:ar:نقاش المستخدم:عبدالرحمن رضا اسماعيل
- Currently, when running the bot on a whole namespace (for example) and the bot encounters such pages, the bot run stops.
- This wastes a lot of time from the bot operator as the bot run has to be restarted manually.
Request:
- Please make the bot skip such pages (i.e. not break the bot run) when it encounters such pages. Thank you.