Last modified: 2014-11-09 21:06:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61227, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59227 - pywikibot.data.api.APIError: internal_api_error_ReadOnlyError when the database is locked
pywikibot.data.api.APIError: internal_api_error_ReadOnlyError when the databa...
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized normal
: ---
Assigned To: Pywikipedia bugs
:
: 56321 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-02 21:17 UTC by Maarten Dammers
Modified: 2014-11-09 21:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Maarten Dammers 2014-01-02 21:17:38 UTC
Database is locked at the moment. Makes the pywikibot crash with this error:

Adding new Commons category claim to [[Commons:Category:Green Party of British Columbia]] based on [[en:Category:Green Party of British Columbia]]
Traceback (most recent call last):
  File "C:\pywikibot\core\commonscat_to_wikidata.py", line 238, in <module>
    main()
  File "C:\pywikibot\core\commonscat_to_wikidata.py", line 235, in main
    bot.run()
  File "C:\pywikibot\core\commonscat_to_wikidata.py", line 94, in run
    newclaim.addSource(source, bot=True)
  File "C:\pywikibot\core\pywikibot\page.py", line 2957, in addSource
    self.addSources([claim], **kwargs)
  File "C:\pywikibot\core\pywikibot\page.py", line 2965, in addSources
    data = self.repo.editSource(self, claims, new=True, **kwargs)
  File "C:\pywikibot\core\pywikibot\site.py", line 720, in callee
    return fn(self, *args, **kwargs)
  File "C:\pywikibot\core\pywikibot\site.py", line 3797, in editSource
    data = req.submit()
  File "C:\pywikibot\core\pywikibot\data\api.py", line 401, in submit
    raise APIError(code, info, **result["error"])
pywikibot.data.api.APIError: internal_api_error_ReadOnlyError: Exception Caught:
 The database is currently locked to new entries and other modifications, probably for routine database maintenance, after which it will be back to normal.

The administrator who locked it offered this explanation: The database has been automatically locked while the slave database servers catch up to the master

Should be caught like any other api error, back off, wait some time. Try again until we reach max tries.
Comment 1 Gerrit Notification Bot 2014-01-02 21:53:53 UTC
Change 105099 had a related patch set uploaded by Merlijn van Deen:
(bug 59227) retry on internal_api_error_ReadOnlyError

https://gerrit.wikimedia.org/r/105099
Comment 2 Gerrit Notification Bot 2014-01-03 08:28:11 UTC
Change 105099 merged by jenkins-bot:
(bug 59227) retry on internal_api_error_ReadOnlyError

https://gerrit.wikimedia.org/r/105099
Comment 3 Gerrit Notification Bot 2014-01-03 08:41:36 UTC
Change 105152 had a related patch set uploaded by Xqt:
(bug 59227) retry on all internal_api_error_s

https://gerrit.wikimedia.org/r/105152
Comment 4 Gerrit Notification Bot 2014-01-03 11:59:28 UTC
Change 105152 merged by jenkins-bot:
(bug 59227) retry on all internal_api_error_s

https://gerrit.wikimedia.org/r/105152
Comment 5 John Mark Vandenberg 2014-11-09 21:06:08 UTC
*** Bug 56321 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links