XZise added a subscriber: XZise. XZise added a comment.
I'm currently guessing but it does sort of make sense. The second APIError happens probably because after the first failed login the API knows that login doesn't work and doesn't attempt to login but just reraises the possible APIError caught in the first attempt.
TASK DETAIL https://phabricator.wikimedia.org/T100965
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Aklapper, jayvdb, pywikipedia-bugs