Last modified: 2014-09-18 09:20: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 T56311, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54311 - Random api errors
Random api errors
Status: NEW
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-19 08:57 UTC by Maarten Dammers
Modified: 2014-09-18 09:20 UTC (History)
3 users (show)

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


Attachments

Description Maarten Dammers 2013-09-19 08:57:11 UTC
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
Comment 1 xqt 2014-06-06 11:39:22 UTC
Is this bug still valid?
Comment 2 Maarten Dammers 2014-06-06 17:13:07 UTC
It is, I still see it every once in a while.
Comment 3 Amir Ladsgroup 2014-07-24 07:35:08 UTC
Frankly I think it's bug of Wikidata not pywikibot, the fast solution could be catching the error and retrying (like network unreachable error)
Comment 4 John Mark Vandenberg 2014-09-18 09:20:08 UTC
It looks like bug 59678 is a dup of this bug.

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


Navigation
Links