whym created this task.
whym added a project: Pywikibot-login.py.
Herald added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION

It appears that Pywikibot does not support auto-creation of local accounts under SUL. Auto-creation happens on someone's first visit to a SUL-connected wiki when they have a global account. It's apparently supported by MediaWiki API, too.

Could login.py support auto-creation?

Currently, when I try to log in to a new SUL-connected wiki, it will result in NoUsername:

Traceback (most recent call last):
  File "pwb.py", line 264, in <module>
    if not main():
  File "pwb.py", line 257, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File "./scripts/login.py", line 190, in <module>
    main()
  File "./scripts/login.py", line 173, in main
    site.login(sysop)
  File "/tmp/pywikibot-core/pywikibot/site.py", line 2091, in login
    if loginMan.login(retry=True):
  File "/tmp/pywikibot-core/pywikibot/login.py", line 298, in login
    self.check_user_exists()
  File "/tmp/pywikibot-core/pywikibot/login.py", line 160, in check_user_exists
    % (main_username, self.site))
pywikibot.exceptions.NoUsername: Username 'Whym test0' does not exist on wikibooks:ja
<class 'pywikibot.exceptions.NoUsername'>

TASK DETAIL
https://phabricator.wikimedia.org/T183466

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: whym
Cc: Aklapper, whym, pywikibot-bugs-list
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to