jenkins-bot has submitted this change and it was merged.
Change subject: (bug 62126) Retry creating a new page at wikidata.
......................................................................
(bug 62126) Retry creating a new page at wikidata.
Bug 46535 reports that bot fails while creating a page with
error "Could not create a new page. It already exists." But
the page does not exist.
This is a temporary patch to solve this problem above until
46535 has been fixed. It tries again until the page has been
created or maxretries exceeded.
There is a remaining problem with this bug/patch. There is no way
to check whether the page does really exist or the API gives
a wrong message.
Change-Id: I30d596d814caf3bf812b38b975019aef5213c787
---
M pywikibot/data/api.py
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 264dc13..f129665 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -392,6 +392,11 @@
if code.startswith(u'internal_api_error_'):
self.wait()
continue
+ # bugs 46535, 62126
+ # maybe removed when it 46535 is solved
+ if code == "failed-save" and action == 'wbeditentity':
+ self.wait()
+ continue
# raise error
try:
pywikibot.log(u"API Error: query=\n%s"
--
To view, visit https://gerrit.wikimedia.org/r/116280
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I30d596d814caf3bf812b38b975019aef5213c787
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Multichill <[email protected]>
Gerrit-Reviewer: Russell Blau <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits