Page MenuHomePhabricator

Compat login broken. KeyError: 'lgtoken'
Closed, DeclinedPublic


Traceback (most recent call last):
  File "C:\Python27\pywikipedia\", line 475, in <module>
  File "C:\Python27\pywikipedia\", line 470, in main
  File "C:\Python27\pywikipedia\", line 344, in login
    cookiedata = self.getCookie(api)
  File "C:\Python27\pywikipedia\", line 258, in getCookie[index] = data['login']['lgtoken'] + "+\\"
KeyError: 'lgtoken'

Related Objects

Event Timeline

XXN created this task.Nov 13 2016, 4:59 PM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptNov 13 2016, 4:59 PM
XXN triaged this task as Unbreak Now! priority.Nov 13 2016, 5:00 PM
Restricted Application added subscribers: Jay8g, Luke081515, TerraCodes. · View Herald TranscriptNov 13 2016, 5:00 PM
Xqt lowered the priority of this task from Unbreak Now! to High.Nov 13 2016, 5:21 PM

Decreasing prio because compat is a deprecated branch.

Xqt added a comment.Nov 13 2016, 5:25 PM

API changes in 1.28:

  • The following response properties from action=login, deprecated in 1.27, are now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies to properly manage session state.
  • Submitting the lgtoken and lgpassword parameters in the query string to action=login is now deprecated and outputs a warning. They should be submitted in the POST body instead.

(imho: better one merge to the core branch instead of investigating into this stuff)

Xqt closed this task as Declined.Nov 20 2016, 8:11 PM

Declined due to decommission compat