| Sc4s2cg added a comment. |
I changed permissions of user-config.py using sudo chmod 666, but it is still complaining that the file is writeable:
peter@peter-BHYVE2:~/NetShare/core$ sudo chmod 666 user-config.py
[sudo] password for peter:
peter@peter-BHYVE2:~/NetShare/core$ python3 pwb.py login
Skipped '/home/peter/NetShare/core/user-config.py': writeable by others.
family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Traceback (most recent call last):
File "/home/peter/NetShare/core/pywikibot/login.py", line 114, in __init__
self.username = self.username or family_usernames['*']
KeyError: '*'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pwb.py", line 251, in <module>
if not main():
File "pwb.py", line 244, in main
run_python_file(filename, [filename] + args, argvu, file_package)
File "pwb.py", line 115, in run_python_file
main_mod.__dict__)
File "./scripts/login.py", line 196, in <module>
main()
File "./scripts/login.py", line 179, in main
site.login(sysop, autocreate=autocreate)
File "/home/peter/NetShare/core/pywikibot/site.py", line 2089, in login
user=self._username[sysop])
File "/home/peter/NetShare/core/pywikibot/tools/__init__.py", line 1446, in wrapper
return obj(*__args, **__kw)
File "/home/peter/NetShare/core/pywikibot/login.py", line 122, 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'
<class 'pywikibot.exceptions.NoUsername'>
CRITICAL: Closing network session.So you have to run login twice, right? Once for creating user-config.py and second time for logging in.
Yes, exactly.
Also please make sure you have an updated version as today there was a major issue fixed with generate_user_files.py
I redownloaded from here, but am still having to manually edit the user-config.py. Is there a different source I should be using?
Please also share values of mylang, myfamily, usernames in user-config.py, maybe also your famwiki family file created. If there is no problem in those, then the problem could be in a wiki configuration.
I've attached both files below.F18961893: famwiki_family.py
Cc: Framawiki, Dvorapa, Aklapper, pywikibot-bugs-list, Sc4s2cg, Magul, Tbscho, MayS, Salgo60, Mdupont, JJMC89, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
