Meno25 created this task.
Meno25 added projects: Pywikibot, Pywikibot-Scripts.
Restricted Application added subscribers: pywikibot-bugs-list, alanajjar, 
Aklapper.

TASK DESCRIPTION
  **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:آيت عمار 
<https://ary.wikipedia.org/wiki/%D8%A2%D9%8A%D8%AA_%D8%B9%D9%85%D8%A7%D8%B1> 
that was connected to Q27538657 
<https://www.wikidata.org/w/index.php?title=Q27538657&redirect=no>), it crashes.
  
  **Request:**
  
  - Please make the script skip the page in such cases (but not crash).
  
  **Workaround:**
  
  - I have manually cleared the cash of the article on arywiki (by making a 
null edit) and this solved the problem.

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

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

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

Reply via email to