Topic on Manual talk:Pywikibot

Summary by Xqt

Moved to phab

2806:106E:1E:1870:9124:3F37:C7C3:A07E (talkcontribs)

Hi. Pywikibot had been working fine. Then it started flagging errors, maybe from a python update. i updated pywikibot and python no longer flags errors. But I don't know why I can't log in. i set pywikibot all over again. any ideas? mediawiki 1.33 python 3.8.3


Traceback (most recent call last):

  File "pwb.py", line 360, in <module>

   if not main():

  File "pwb.py", line 352, in main

   run_python_file(filename,

  File "pwb.py", line 73, in run_python_file

   exec(compile(source, filename, 'exec', dont_inherit=True),

  File "./scripts/login.py", line 185, in <module>

   main()

  File "./scripts/login.py", line 167, in main

   site.login(autocreate=autocreate)

  File "/home/yutkeej/pywikibot/pywikibot/tools/__init__.py", line 1499, in wrapper

   return obj(*__args, **__kw)

  File "/home/yutkeej/pywikibot/pywikibot/site/__init__.py", line 1931, in login

   if login_manager.login(retry=True, autocreate=autocreate):

  File "/home/yutkeej/pywikibot/pywikibot/login.py", line 301, in login

   cookiedata = self.getCookie()

  File "/home/yutkeej/pywikibot/pywikibot/tools/__init__.py", line 1584, in wrapper

   return obj(*new_args, **new_kwargs)

  File "/home/yutkeej/pywikibot/pywikibot/data/api.py", line 3197, in getCookie

   and (response['messagecode'] == 'login-throttled'

KeyError: 'messagecode'

CRITICAL: Exiting due to uncaught exception <class 'KeyError'>

Dvorapa (talkcontribs)

Hi, this is an issue with CAPTCHA. Your bot account is not yet trusted by wiki administrators. You can either ask your wiki admins to assign your bot account a Bot flag, or a Confirmed account flag. The Confirmed account flag is assigned automatically when your account is 4 days old or makes more than 10 edits (en:Wikipedia:User_access_levels#Autoconfirmed_users).

Dvorapa (talkcontribs)

@Xqt Perhaps we should catch this new account captcha (and solve it) somehow too. Or we could just throw a better error message than login-throttled (which has nothing to do with captcha)

Xqt (talkcontribs)