Page MenuHomePhabricator

pywikibot login fatal error
Closed, DuplicatePublic

Description

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 pwb.py 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 "pwb.py", line 248, in <module>
    if not main():
  File "pwb.py", line 242, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 120, in run_python_file
    main_mod.__dict__)
  File "./scripts/login.py", line 184, in <module>
    main()
  File "./scripts/login.py", line 169, in main
    site.login(sysop)
  File "/data/project/rezabot/pycore/pywikibot/site.py", line 1996, in login
    if loginMan.login(retry=True):
  File "/data/project/rezabot/pycore/pywikibot/login.py", line 277, in login
    cookiedata = self.getCookie()
  File "/data/project/rezabot/pycore/pywikibot/data/api.py", line 2999, in getCookie
    prefix = login_result['login']['cookieprefix']
KeyError: u'cookieprefix'
<type 'exceptions.KeyError'>
CRITICAL: Closing network session.
tools.rezabot@tools-bastion-02:~/pycore$