WolfgangFahl / py-3rdparty-mediawiki

Wrapper for pywikibot and mwclient MediaWiki API librarties with improvements for 3rd party wikis
Apache License 2.0
4 stars 5 forks source link

wikipush hangs with MWException #75

Closed WolfgangFahl closed 2 years ago

WolfgangFahl commented 2 years ago
wikipush -l -s  orfixed -t rq -p "Form:Rating"    
copying 1 pages from orfixed to rq
1/1 ( 100%): copying Form:Rating ...❌:('internal_api_error_MWException', '[275d60e6bbc11d0c91c8ad14] Caught exception of type MWException', None)
tholzheim commented 2 years ago

This issue is really odd. As far as I have tracked down the issue the problem is the page title. If I execute wikipush -l -s orfixed -t test -p "Form:Rating" I get the same error. But if I move the complete page to Form:Test (Form:RatingForm:Test) and execute wikipush -l -s orfixed -t test -p "Form:Test" it works. Moving the page back results again in an error.

$ wikipush -l -s  orfixed -l -t test  -p "Form:Rating"
copying 1 pages from wikirenderTest to test
1/1 ( 100%): copying Form:Rating ...👎

$ wikipush -l -s  orfixed -l -t test  -p "Form:Test"
copying 1 pages from wikirenderTest to test
1/1 ( 100%): copying Form:Test ...✅

$ wikipush -l -s  orfixed -l -t test  -p "Form:Rating"
copying 1 pages from wikirenderTest to test
1/1 ( 100%): copying Form:Rating ...👎

So I assume the page title is responsible for the issue.

I have observed several times now that certain pages can not be pushed it seems that these cases are related to this issue

WolfgangFahl commented 2 years ago

For the time being using the debug option and showing more details of the problem might help. Is this Mediawiki Version related?

tholzheim commented 2 years ago

I did not check different MediaWiki Versions (tested against 1.35.4 (Page Forms | 5.3.2)).

What do you mean with more details this is the only information you get from the wiki api

{
    "error":
    {
        "code": "internal_api_error_MWException",
        "info": "[d503a790754280a592b8a62e] Caught exception of type MWException",
        "errorclass": "MWException"
    }
}
tholzheim commented 2 years ago

If the page is created before the push (empty page) the error is not thrown but the content of the page is also not pushed so the issue for Form:Rating remains if the page already exists.

WolfgangFahl commented 2 years ago

I assume this only happens in broken wikis and there might be a related phabricator task.