Command line:
python3 pwb.py commonscat -lang:ary -start:!
Output:
Script terminated by exception:
ERROR: IsRedirectPage: Page [[wikidata:Q27538657]] is a redirect page.
Traceback (most recent call last):
File "pwb.py", line 363, in <module>
if not main():
File "pwb.py", line 358, in main
file_package)
File "pwb.py", line 75, in run_python_file
main_mod.__dict__)
File "./scripts/commonscat.py", line 557, in <module>
main()
File "./scripts/commonscat.py", line 551, in main
bot.run()
File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 1498, in run
self.treat(page)
File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 1777, in treat
self.treat_page()
File "./scripts/commonscat.py", line 312, in treat_page
commonscatLink = self.find_commons_category(page)
File "./scripts/commonscat.py", line 406, in find_commons_category
claim = page.get_best_claim(cat_property)
File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/page/__init__.py", line 2383, in get_best_claim
item_page.get()
File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/page/__init__.py", line 4597, in get
raise pywikibot.IsRedirectPage(self)
pywikibot.exceptions.IsRedirectPage: Page [[wikidata:Q27538657]] is a redirect page.
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.IsRedirectPage'>Description of problem:
- When commonscat.py runs on an article that is connected to a redirected Wikidata item (ary:آيت عمار that was connected to Q27538657), it crashes.
Request:
- Please make the script skip the page in such cases (but not crash).
Workaround:
- I have manually cleared the cache of the article on arywiki (by making a null edit) and this solved the problem.