Aram added a comment.
@Xqt, After updating `scripts/category_redirect.py` with your last edit and running the script, looks like it is now modifying the old categories to new ones as you can see in this edit <https://ckb.wikipedia.org/w/index.php?title=%D8%AA%DB%8C_%D8%AF%DB%8C_%DA%A9%DB%95%D9%86%DB%95%D8%AF%D8%A7_%D8%AA%D8%B1%DB%95%D8%B3%D8%AA&diff=prev&oldid=1138300>. The diff, edit summary and prompt were showed. But the script firstly, `Checking hard-redirect category pages` and after interrupting the script, it says: User quit CategoryRedirectBot bot run... Continue with soft category redirects ([y]es, [n]o): I said yes, and this is the next lines: Checking 52 category redirect pages Page [[پۆل:ئافرەتان لە ئاسیا]] saved Moving pages out of 22 redirected categories. Retrieving 22 pages from wikipedia:ckb. >>> پۆل:ئابوور بە پێی وڵات <<< Sleeping for 6.7 seconds, 2023-12-08 19:08:13 Page [[تی دی کەنەدا ترەست]] saved Sleeping for 8.6 seconds, 2023-12-08 19:08:21 Page [[بەکارھێنەر:AramBot/category redirect log]] saved 59 read operations 1 write operation 1 touch operation Execution time: 269 seconds Read operation time: 4.6 seconds Write operation time: 269.0 seconds Touch operation time: 269.0 seconds Script terminated by exception: ERROR: 'CategoryRedirectBot' object has no attribute 'Counter' (AttributeError) Traceback (most recent call last): File "C:\Pywikibot master\pwb.py", line 39, in <module> sys.exit(main()) File "C:\Pywikibot master\pwb.py", line 35, in main runpy.run_path(str(path), run_name='__main__') File "C:\Users\Aram\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 289, in run_path return _run_module_code(code, init_globals, run_name, File "C:\Users\Aram\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "C:\Users\Aram\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Pywikibot master\pywikibot\scripts\wrapper.py", line 515, in <module> main() File "C:\Pywikibot master\pywikibot\scripts\wrapper.py", line 499, in main if not execute(): File "C:\Pywikibot master\pywikibot\scripts\wrapper.py", line 486, in execute run_python_file(filename, script_args, module) File "C:\Pywikibot master\pywikibot\scripts\wrapper.py", line 147, in run_python_file exec(compile(source, filename, 'exec', dont_inherit=True), File "C:\Pywikibot master\scripts\category_redirect.py", line 570, in <module> main() File "C:\Pywikibot master\scripts\category_redirect.py", line 566, in main bot.run() File "C:\Pywikibot master\scripts\category_redirect.py", line 513, in run super().run() File "C:\Pywikibot master\pywikibot\bot.py", line 1653, in run self.treat(page) File "C:\Pywikibot master\pywikibot\bot.py", line 1906, in treat self.treat_page() File "C:\Pywikibot master\scripts\category_redirect.py", line 470, in check_soft_redirect found, moved = self.move_contents( File "C:\Pywikibot master\scripts\category_redirect.py", line 174, in move_contents self.Counter['move'] += moved AttributeError: 'CategoryRedirectBot' object has no attribute 'Counter'. Did you mean: 'counter'? CRITICAL: Exiting due to uncaught exception AttributeError: 'CategoryRedirectBot' object has no attribute 'Counter' This is the log till now <https://ckb.wikipedia.org/w/index.php?title=%D8%A8%DB%95%DA%A9%D8%A7%D8%B1%DA%BE%DB%8E%D9%86%DB%95%D8%B1:AramBot/category_redirect_log&oldid=1138302>. It added the template here <https://ckb.wikipedia.org/wiki/%D9%BE%DB%86%D9%84:%D8%A6%D8%A7%D9%81%D8%B1%DB%95%D8%AA%D8%A7%D9%86_%D9%84%DB%95_%D8%A6%D8%A7%D8%B3%DB%8C%D8%A7>, but didn't moved subcategories. Also logged the template added to other categories, but I can't see the template at at all. Till now, I have never faced double redirects. I hope my comment was useful, not annoying you. TASK DETAIL https://phabricator.wikimedia.org/T351951 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Aram Cc: Xqt, Aklapper, pywikibot-bugs-list, Aram, mevo, Isabelladantes1983, Themindcoder, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657, PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule, Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor, CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho, MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Neuronton, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
