Xqt created this task.
Xqt added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  While trying to login to Pywikibot using the command python3 pwb.py login, I 
am getting the following error
  
    Skipped '/home/user/pywikibot/core_stable/user-config.py': writeable by 
others.
    family and mylang are not set.
    Defaulting to family='wikipedia' and mylang='test'.
    WARNING: No user is logged in on site wikipedia:test
    Traceback (most recent call last):
      File "/home/user/pywikibot/core_stable/pywikibot/login.py", line 115, in 
__init__
       user = code_to_usr.get(site.code) or code_to_usr['*']
    KeyError: '*'
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "pwb.py", line 363, in <module>
       if not main():
      File "pwb.py", line 355, in main
       run_python_file(filename,
      File "pwb.py", line 74, in run_python_file
       exec(compile(source, filename, 'exec', dont_inherit=True),
      File "./scripts/login.py", line 192, in <module>
       main()
      File "./scripts/login.py", line 174, in main
       site.login(autocreate=autocreate)
      File "/home/user/pywikibot/core_stable/pywikibot/tools/__init__.py", line 
1481, in wrapper
       return obj(*__args, **__kw)
      File "/home/user/pywikibot/core_stable/pywikibot/site/__init__.py", line 
333, in login
       login_manager = api.LoginManager(site=self, user=self.username())
      File "/home/user/pywikibot/core_stable/pywikibot/tools/__init__.py", line 
1481, in wrapper
       return obj(*__args, **__kw)
      File "/home/user/pywikibot/core_stable/pywikibot/login.py", line 117, in 
__init__
       raise NoUsername(
    pywikibot.exceptions.NoUsername: ERROR: username for wikipedia:test is 
undefined.
    If you have a username for that site, please add a line to user-config.py 
as follows:
    usernames['wikipedia']['test'] = 'myUsername'
    CRITICAL: Exiting due to uncaught exception <class 
'pywikibot.exceptions.NoUsername'>
  
  Since the wiki is a third party wiki, I have actually created password.py 
file, added the family file and also created the user-config.py file. But still 
the error is showing
  
  Task copied from https://www.mediawiki.org/wiki/Topic:W0k4pyrrae4jxx6v

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

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

To: Xqt
Cc: Adithyak1997, Aklapper, Xqt, pywikibot-bugs-list, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to