Multichill created this task. Multichill added a subscriber: Multichill. Multichill added projects: pywikibot-core, Pywikibot-Wikidata.
TASK DESCRIPTION When running a bot I seem to run into this situation about once a day:
Adding instance claim to [[wikidata:Q592478]] Adding new reference claim to [[wikidata:Q592478]] ERROR: Detected MediaWiki API exception ReadOnlyError; retrying WARNING: Waiting 5 seconds before retrying. Traceback (most recent call last): File "C:\pywikibot\coredev\viaf_import.py", line 445, in <module> main() File "C:\pywikibot\coredev\viaf_import.py", line 440, in main viafBot.run() File "C:\pywikibot\coredev\viaf_import.py", line 85, in run self.addOtherRegistries(personItem, viafid, regdict) File "C:\pywikibot\coredev\viaf_import.py", line 104, in addOtherRegistries self.addViafReference(personItem, newclaim, viafid) File "C:\pywikibot\coredev\viaf_import.py", line 317, in addViafReference newclaim.addSources([refstated, refurl, refdate]) File "C:\pywikibot\coredev\pywikibot\page.py", line 3881, in addSources data = self.repo.editSource(self, claims, new=True, **kwargs) File "C:\pywikibot\coredev\pywikibot\site.py", line 987, in callee return fn(self, *args, **kwargs) File "C:\pywikibot\coredev\pywikibot\site.py", line 5369, in editSource data = req.submit() File "C:\pywikibot\coredev\pywikibot\data\api.py", line 1071, in submit raise APIError(code, info, **result["error"]) pywikibot.data.api.APIError: editconflict: Edit conflict. <class 'pywikibot.data.api.APIError'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
* Bot adds claim (no problem) * Bot adds reference * Runs into a ReadOnlyError * Tries again * Editconflict It's a bit weird because it looks like at https://www.wikidata.org/w/index.php?title=Q592478&action=history the reference was added in the first step.
I'll file another bug for the frequent MediaWiki switching to read-only problems. I also encountered that as a user.
TASK DETAIL https://phabricator.wikimedia.org/T85341
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Multichill Cc: Aklapper, Multichill, jayvdb, pywikipedia-bugs