Page MenuHomePhabricator

Provide an option to auto-create account on a first log-in to a local wiki under SUL
Closed, ResolvedPublic


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 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 "", line 264, in <module>
    if not main():
  File "", line 257, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "", line 121, in run_python_file
  File "./scripts/", line 190, in <module>
  File "./scripts/", line 173, in main
  File "/tmp/pywikibot-core/pywikibot/", line 2091, in login
    if loginMan.login(retry=True):
  File "/tmp/pywikibot-core/pywikibot/", line 298, in login
  File "/tmp/pywikibot-core/pywikibot/", line 160, in check_user_exists
    % (main_username,
pywikibot.exceptions.NoUsername: Username 'Whym test0' does not exist on wikibooks:ja
<class 'pywikibot.exceptions.NoUsername'>

Event Timeline

Change 399625 had a related patch set uploaded (by Whym; owner: Whym):
[pywikibot/core@master] Add option to auto-create accounts when logging in

Xqt claimed this task.
Xqt reassigned this task from Xqt to whym.
Xqt added a subscriber: Xqt.

Change 399625 merged by jenkins-bot:
[pywikibot/core@master] Add option to auto-create accounts when logging in