Last modified: 2013-12-19 03:36:52 UTC
In [1]: import pywikibot In [2]: s = pywikibot.Site("et", "wikipedia") In [3]: p = pywikibot.Page(s, "Hannes Varblane") In [4]: p.isDisambig() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-4-af3848c4be35> in <module>() ----> 1 p.isDisambig() /home/wieland/dev/pywikibot-core/pywikibot/page.pyc in isDisambig(self, get_Index) 569 if self.site.hasExtension('Disambiguator', False): 570 # If the Disambiguator extension is loaded, use it --> 571 return 'disambiguation' in self.properties() 572 573 if not hasattr(self.site, "_disambigtemplates"): /home/wieland/dev/pywikibot-core/pywikibot/page.pyc in properties(self, force) 379 if not hasattr(self, '_pageprops') or force: 380 self.site.loadpageprops(self) --> 381 return self._pageprops 382 383 def defaultsort(self, force=False): AttributeError: 'Page' object has no attribute '_pageprops' ยป git describe --always --dirty a987c8e-dirty (Dirty here refers to the submodules having been updated) This is obviously using the core branch.
Change 87060 had a related patch set uploaded by FelixReimann: Set _pageprops to {} per default before updating from live site as - a page without any pageprops has no corresponding entry in the pagedict and, thus, Page._pageprops will not be set in api.update_page() - the pageprops may be removed after a forced upda https://gerrit.wikimedia.org/r/87060
Keeping this open so someone can work on a better solution than the current one.
Change 87060 merged by jenkins-bot: Bug 54868 - isDisambig results in AttributeError https://gerrit.wikimedia.org/r/87060
Change 96951 had a related patch set uploaded by Legoktm: Return an empty array if there are no page properties https://gerrit.wikimedia.org/r/96951
(In reply to comment #2) > Keeping this open so someone can work on a better solution than the current > one. Fixing MediaWiki sounds like a better solution to me :)
Change 96951 abandoned by Legoktm: Return an empty array if there are no page properties https://gerrit.wikimedia.org/r/96951