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
Now it does (r8571)
xqt
----- Original Nachricht ---- Von: "Dr. Trigon" dr.trigon@surfeu.ch An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 17.09.2010 00:35 Betreff: [Pywikipedia-l] Question about getVersionHistory
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
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Heute erleben, was morgen Trend wird - das kann man auf der IFA in Berlin. Oder auf arcor.de: Wir stellen Ihnen die wichtigsten News, Trends und Gadgets der IFA vor. Natürlich mit dabei: das brandneue IPTV-Angebot von Vodafone! Alles rund um die Internationale Funkausstellung in Berlin finden Sie hier: http://www.arcor.de/rd/footer.ifa2010