Web browser: ---
            Bug ID: 58976
           Summary: PreloadingItemGenerator crashes with NoPage exception
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Wikidata
    Classification: Unclassified
   Mobile Platform: ---

The PreloadingItemGenerator does what the name suggests: Preload Wikidata items
so that these can be processed quickly.

When it encounters an item that has been deleted it crashes with a
"pywikibot.exceptions.NoPage: Page [[wikidata:-1]] doesn't exist." exception. 

It shouldn't crash. It should either:
* Not preload the item and pass the empty item (and let downstream check)
* Skip the item

Probably best to have the same behavior as with the PreloadingPageGenerator (or
does that one crash too?)

Full trace:

Traceback (most recent call last):
  File "C:\pywikibot\core\", line 131, in <module>
  File "C:\pywikibot\core\", line 128, in main
  File "C:\pywikibot\core\", line 31, in run
    for item in self.generator:
  File "C:\pywikibot\core\pywikibot\", line 890, in
    for i in site.preloaditempages(group, step):
  File "C:\pywikibot\core\pywikibot\", line 3625, in preloaditempages
    item.get()  # parses json and preloads the various properties
  File "C:\pywikibot\core\pywikibot\", line 2592, in get
    super(ItemPage, self).get(force=force, *args)
  File "C:\pywikibot\core\pywikibot\", line 2421, in get
    raise pywikibot.NoPage(self)
pywikibot.exceptions.NoPage: Page [[wikidata:-1]] doesn't exist.

You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to