Any script being run through pwb.py gives
File "pwb.py", line 257, in <module> if not main(): File "pwb.py", line 250, in main run_python_file(filename, [filename] + args, argvu, file_package) File "pwb.py", line 119, in run_python_file main_mod.__dict__) File "./scripts/login.py", line 198, in <module> main() File "./scripts/login.py", line 180, in main site.login(sysop, autocreate=autocreate) File "/mnt/c/Users/wesalius/Desktop/core/pywikibot/pywikibot/site.py", line 2103, in login site=self, sysop=sysop, user=self._username[sysop]) File "/mnt/c/Users/wesalius/Desktop/core/pywikibot/pywikibot/tools/__init__.py", line 1737, in wrapper return obj(*__args, **__kw) File "/mnt/c/Users/wesalius/Desktop/core/pywikibot/pywikibot/login.py", line 120, in __init__ 'wiki_code': self.site.code}) pywikibot.exceptions.NoUsername: ERROR: Username for test:test is undefined. If you have an account for that site, please add a line to user-config.py: usernames['test']['test'] = 'myUsername' CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.NoUsername'>
Setup:
Win10 through WSL debian Pywikibot: [https] wikimedia-pywikibot.git (8d70cc4, g10542, 2018/12/27, 11:00:35, OUTDATED) Release version: 3.1.dev0 requests version: 2.21.0 cacerts: /home/wesalius/.local/lib/python3.5/site-packages/certifi/cacert.pem certificate test: ok Python: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
User-config.py is read-write for all users, script-generated without any additions to it:
# before the definition of the ‘family’ variable. family = 'wikipedia' # The language code of the site we're working on. mylang = 'cs' # The dictionary usernames should contain a username for each site where you # have a bot account. If you have a unique username for all languages of a # family , you can use '*' usernames['wikipedia']['cs'] = u'Wesalius'