[Pywikipedia-l] Question about getVersionHistory

Dr. Trigon dr.trigon at surfeu.ch
Thu Sep 16 22:35:57 UTC 2010


Hello all

Is it ok, that page.getVersionHistory without a previous page.get is
not able to correctly resolve NoPage (and may be other). Example is the
page 'Wikipedia Diskussion:WikiProjekt 
Portale/Baustelle/Portal:Biochemie' which throws the python error:

Traceback (most recent call last):
   File "tests/dtbext_tester.py", line 240, in <module>
     TEST_get()
   File "tests/dtbext_tester.py", line 226, in TEST_get
     page.getVersionHistory()
   File "./wikipedia.py", line 2576, in getVersionHistory
     dataQuery.extend(self._getVersionHistory(getAll, skip, 
reverseOrder, revCount))
   File "./wikipedia.py", line 2627, in _getVersionHistory
     for r in result['query']['pages'].values()[0]['revisions']:
KeyError: 'revisions'

So it seams that getVersionHistory and _getVersionHistory do not resolve
and throw the needed exceptions.

Greetings
DrTrigon



More information about the Pywikipedia-l mailing list