Page MenuHomePhabricator

KeyError: u'this-property-does-not-exist' on Travis CI
Closed, ResolvedPublic


ERROR: test_not_exists (tests.site_tests.TestSiteInfo)
Test accessing a property not in siteinfo.
Traceback (most recent call last):
  File "/home/travis/build/wikimedia/pywikibot-core/tests/", line 2210, in test_not_exists
    self.assertEqual(len(mysite.siteinfo.get(not_exists)), 0)
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/", line 1678, in get
    preloaded = self._get_siteinfo(key, expiry)[key]
KeyError: u'this-property-does-not-exist'


Event Timeline

I checked on older commit and it also is raising this error (which haven't been raised before). It looks, that some change on zh.wikisource occurs in between.

On problem doesn't occurs. Raw API message from this test looks like:

en.wikiUnrecognized value for parameter 'siprop': this-property-does-not-exist
zh.wikisourceUnrecognized value for parameter "siprop": this-property-does-not-exist.
This comment was removed by Magul.

It looks like regression introduced in MW. I will update regex here, but we need to figure out how to not depend on message (is it going to pass code of an error)?

Change 327551 had a related patch set uploaded (by Magul):
Fix regex for error message in siteinfo request

Change 327551 merged by jenkins-bot:
Fix regex for error message in siteinfo request