Page MenuHomePhabricator

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

Description

======================================================================
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/site_tests.py", line 2210, in test_not_exists
    self.assertEqual(len(mysite.siteinfo.get(not_exists)), 0)
  File "/home/travis/build/wikimedia/pywikibot-core/pywikibot/site.py", line 1678, in get
    preloaded = self._get_siteinfo(key, expiry)[key]
KeyError: u'this-property-does-not-exist'

see: https://travis-ci.org/wikimedia/pywikibot-core/jobs/184242117#L4477-L4486

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 en.wiki problem doesn't occurs. Raw API message from this test looks like:

urlmessage
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

https://gerrit.wikimedia.org/r/327551

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

https://gerrit.wikimedia.org/r/327551