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

TASK DESCRIPTION
  **Steps to replicate the issue** (include links if applicable):
  
  - Run `python pwb.py delinker.py`
  - After a while, you will get:
  
    Reading settings from scripts.ini file.
    .
    Update 'since' to scripts.ini file
    
    Execution time: 3 seconds
    Script terminated by exception:
    
    ERROR: loadimageinfo: Query on [[commons:File:Map.jpg]] returned no 
imageinfo (PageRelatedError)
    Traceback (most recent call last):
      File "C:\Pywikibot\pwb.py", line 40, in <module>
        sys.exit(main())
                 ^^^^^^
      File "C:\Pywikibot\pwb.py", line 36, in main
        runpy.run_path(str(path), run_name='__main__')
      File "<frozen runpy>", line 286, in run_path
      File "<frozen runpy>", line 98, in _run_module_code
      File "<frozen runpy>", line 88, in _run_code
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 521, in <module>
        main()
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 505, in main
        if not execute():
               ^^^^^^^^^
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 492, in execute
        run_python_file(filename, script_args, module)
      File "C:\Pywikibot\pywikibot\scripts\wrapper.py", line 149, in 
run_python_file
        exec(compile(source, filename, 'exec', dont_inherit=True),
      File "C:\Pywikibot\scripts\delinker.py", line 164, in <module>
        main()
      File "C:\Pywikibot\scripts\delinker.py", line 160, in main
        bot.run()
      File "C:\Pywikibot\pywikibot\bot.py", line 1576, in run
        if self.skip_page(page):
           ^^^^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\scripts\delinker.py", line 96, in skip_page
        if page.file_is_shared() or page.exists():
           ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\pywikibot\page\_filepage.py", line 218, in 
file_is_shared
        info = self.latest_file_info
               ^^^^^^^^^^^^^^^^^^^^^
      File "C:\Pywikibot\pywikibot\page\_filepage.py", line 109, in 
latest_file_info
        self.site.loadimageinfo(self, history=True)
      File "C:\Pywikibot\pywikibot\site\_apisite.py", line 1534, in 
loadimageinfo
        self._update_page(page, query, verify_imageinfo=True)
      File "C:\Pywikibot\pywikibot\site\_apisite.py", line 1448, in _update_page
        raise PageRelatedError(
    pywikibot.exceptions.PageRelatedError: loadimageinfo: Query on 
[[commons:File:Map.jpg]] returned no imageinfo
    CRITICAL: Exiting due to uncaught exception PageRelatedError: 
loadimageinfo: Query on [[commons:File:Map.jpg]] returned no imageinfo
  
  **What happens?**:
  I can only provide the commons link: 
https://commons.wikimedia.org/wiki/File:Map.jpg
  Similar links:
  
  - https://commons.wikimedia.org/wiki/File:Map.JPG
  - https://commons.wikimedia.org/w/index.php?title=File:MAP.jpg&redirect=no
  
  The error is strange. I don't know why we got that error. The file exists, 
but why is the script working on it?!
  
  **What should have happened instead?**:
  I just added a `try-except` to get rid of the error (on my local pc), but I 
don't know if it is a good solution.
  
  **Software version**:
  Release version: 9.3.1

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

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

To: Aram
Cc: Aklapper, pywikibot-bugs-list, Aram, mevo, PotsdamLamb, Jyoo1011, 
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, 
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, 
Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to