Page MenuHomePhabricator

pywikibot login fatal error
Closed, DuplicatePublic


when I want to login by bot it shows this error. I use core and it is updated.

tools.rezabot@tools-bastion-02:~/pycore$ python login
Logging in to wikipedia:fa as Rezabot
WARNING: API warning (login): Fetching a token via action=login is deprecated. Use action=query&meta=tokens&type=login instead.
WARNING: API warning (login): Main-account login via action=login is deprecated and may stop working without warning. To continue login with action=login, see [[Special:BotPasswords]]. To safely continue using main-account login, see action=clientlogin.
Traceback (most recent call last):
  File "", line 248, in <module>
    if not main():
  File "", line 242, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "", line 120, in run_python_file
  File "./scripts/", line 184, in <module>
  File "./scripts/", line 169, in main
  File "/data/project/rezabot/pycore/pywikibot/", line 1996, in login
    if loginMan.login(retry=True):
  File "/data/project/rezabot/pycore/pywikibot/", line 277, in login
    cookiedata = self.getCookie()
  File "/data/project/rezabot/pycore/pywikibot/data/", line 2999, in getCookie
    prefix = login_result['login']['cookieprefix']
KeyError: u'cookieprefix'
<type 'exceptions.KeyError'>
CRITICAL: Closing network session.