Last modified: 2014-04-21 09:32:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66137, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64137 - Revision key not found
Revision key not found
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-19 16:10 UTC by xqt
Modified: 2014-04-21 09:32 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description xqt 2014-04-19 16:10:59 UTC
Running page_tests an error occurs:

c:\Pywikipedia\ssh\pywikibot\core>pwb.py tests/page_tests
...E.............
======================================================================
ERROR: testApiMethods (__main__.TestPageObject)
Test various methods that rely on API.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/page_tests.py", line 297, in testApiMethods
    self.assertType(mainpage.editTime(), pywikibot.Timestamp)
  File "C:\Pywikipedia\ssh\pywikibot\core\pywikibot\page.py", line 457, in editT
ime
    return self._revisions[rev].timestamp
KeyError: 598252063

----------------------------------------------------------------------
Ran 17 tests in 0.440s

FAILED (errors=1)

c:\Pywikipedia\ssh\pywikibot\core>

Seems that self.site.loadrevisions(self) in editTime() method does not load the needed revision as expected.
Comment 1 Mpaa 2014-04-19 21:36:34 UTC
Works for me after cleaning apicache.
Comment 2 Mpaa 2014-04-19 21:59:19 UTC
The following fails if family is not "wikipedia" in user-config.py:

....F............
======================================================================
FAIL: testGeneral (page_tests.TestPageObject)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "page_tests.py", line 116, in testGeneral
    % (site.lang, mainpage.title()))
AssertionError: '[[wikipedia:en:Main Page]]' != u'[[en:Main Page]]'

----------------------------------------------------------------------
Ran 17 tests in 1.200s


It should not be mandatory to run tests using wikipedia as config family.
Comment 3 xqt 2014-04-20 06:50:19 UTC
Cleaning the api cache was my first thougth but it still happened
Comment 4 xqt 2014-04-20 11:00:08 UTC
2nd part (AssertionError) fixed in https://gerrit.wikimedia.org/r/#/c/127435/
Comment 5 Gerrit Notification Bot 2014-04-20 19:55:05 UTC
Change 127435 had a related patch set uploaded by Merlijn van Deen:
(bug 64137) Some more Page.title() testing

https://gerrit.wikimedia.org/r/127435
Comment 6 Gerrit Notification Bot 2014-04-20 20:04:17 UTC
Change 127435 merged by jenkins-bot:
(bug 64137) Some more Page.title() testing

https://gerrit.wikimedia.org/r/127435
Comment 7 xqt 2014-04-21 09:32:40 UTC
I found it: It was apicache. But why does tests have it's own cache?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links