Due to T272319: Frequent "Nonce already used" errors in scripts and tools, login is broken sometimes (happened 50 times over 700 logins). Automatic retry may be performed to avoid showing error to the user.
(4 additional frame(s) were not displayed) File "flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "quarry/web/login.py", line 34, in login redirect_url, request_token = handshaker.initiate() File "mwoauth/handshaker.py", line 89, in initiate user_agent=self.user_agent) File "mwoauth/functions.py", line 98, in initiate "{0}".format(repr(r.content))) OAuthException: Expected x-www-form-urlencoded response from MediaWiki, but got something else: b'Error: An error occurred in the OAuth protocol: Nonce already used: 873230511213254369'
See also patch on another tool: R2362:23ccbcf6f670: Work around MediaWiki “Nonce already used” errors