https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
Web browser: --- Bug ID: 54311 Summary: Random api errors Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: maarten@mdammers.nl Classification: Unclassified Mobile Platform: ---
I'm running several bots and every once in a while a bot crashes:
Adding new template claim to [[wikidata:Q6614219]] Traceback (most recent call last): File "C:\pywikibot\core\add_template.py", line 120, in <module> main() File "C:\pywikibot\core\add_template.py", line 117, in main bot.run() File "C:\pywikibot\core\add_template.py", line 52, in run item.addClaim(newclaim) File "C:\pywikibot\core\pywikibot\page.py", line 2676, in addClaim self.repo.addClaim(self, claim, bot=bot, **kwargs) File "C:\pywikibot\core\pywikibot\site.py", line 709, in callee return fn(self, *args, **kwargs) File "C:\pywikibot\core\pywikibot\site.py", line 3578, in addClaim data = req.submit() File "C:\pywikibot\core\pywikibot\data\api.py", line 394, in submit raise APIError(code, info, **result["error"]) pywikibot.data.api.APIError: badtoken: * '''Sorry! We could not process your edi t due to a loss of session data.''' Please try again. If it still does not work, try [[Special:UserLogout|logging out]] and logging ba ck in. * There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again.
This exception should be caught and the addClaim should be retried.
Maybe a Wikidata bug should be filed too to figure out why we seem to loose session data every once in a while
https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |UNCONFIRMED CC| |info@gno.de Ever confirmed|1 |0
--- Comment #1 from xqt info@gno.de --- Is this bug still valid?
https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
Maarten Dammers maarten@mdammers.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #2 from Maarten Dammers maarten@mdammers.nl --- It is, I still see it every once in a while.
https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |Normal CC| |ladsgroup@gmail.com
--- Comment #3 from Amir Ladsgroup ladsgroup@gmail.com --- Frankly I think it's bug of Wikidata not pywikibot, the fast solution could be catching the error and retrying (like network unreachable error)
https://bugzilla.wikimedia.org/show_bug.cgi?id=54311
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jayvdb@gmail.com See Also| |https://bugzilla.wikimedia. | |org/show_bug.cgi?id=59678
--- Comment #4 from John Mark Vandenberg jayvdb@gmail.com --- It looks like bug 59678 is a dup of this bug.
pywikipedia-bugs@lists.wikimedia.org