Page MenuHomePhabricator

KeyError 204 on Travis and Appveyor
Closed, ResolvedPublic

Description

It occurs that there are consistent failing tests on Travis and Appveyor that ends up with KeyError 204, see e.g.:

After some brief investigation it occurs that Tranlatewiki has some issue with namespaces. In their API (see: https://translatewiki.net/w/api.php?action=query&meta=siteinfo&continue=&siprop=namespaces|namespacealiases|general&format=json) that they have namespacealiases for namespace 204 and 205, that don't exist in their namespaces array.

What can we do here? Should we omit namespacealiases that point to nonexisting namespaces? @Xqt @jayvdb @Dalba @Legoktm

Filed upstream as https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1975

Related Objects

Event Timeline

Magul triaged this task as High priority.Nov 20 2016, 7:57 PM

Change 322508 had a related patch set uploaded (by Magul):
Make parsing site's parameters resistant to broken namespace alias

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

Shouldn't this be solved upstream (too)?

Xqt moved this task from Backlog to Upstream issues on the Pywikibot-tests board.

Yes, it should. I wasn't aware that we have a board for translatewiki here.

Change 322944 had a related patch set uploaded (by Magul):
Skip failing tests until upstream issue will be resolved.

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

@Until this issue will be resolved upstream we should make our tests passing.

I have created two patches that will make this particular problem go away. One is touching our main code and second one is just raising SkipTest exception in test. Could we choose one of them or if anybody has any other idea, how to handle this problem?

Resolving this issue will make around 50% jobs on Travis and Appveyor pass all tests.

Links to patches:

@Xqt @jayvdb @Lokal_Profil @Mpaa @Dalba ?

It seems that currently pywikibot is completely broken on TW. We can remedy the situation with the first patch, therefore I prefer that one. We can revert it later if we want.

Change 322508 merged by jenkins-bot:
Make parsing site's parameters resistant to broken namespace alias

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

Change 322944 abandoned by Magul:
Expected failing tests until upstream issue will be resolved.

Reason:
Merge of I917caec8f5e78a80c221c941e71feb86861b401c

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