Topic on Project:Support desk

why can not login Pywikibot when run python pwb.py login

5
Beginneruser (talkcontribs)

Hi

First create user-config.py and set

mylang ='en'
family ='yoursite'
usernames['yoursite']['en']='MySiteBot'
console_encoding = 'utf-8'

and run python generate_family_file.py then create family

but when run python pwb.py login

Skipped '/home/wiki/web/Pywikibot/user-config.py': owned by someone else.
family and mylang are not set.
Defaulting to family='test' and mylang='test'.
Traceback (most recent call last):
 File "pwb.py", line 250, in <module>
   if not main():
 File "pwb.py", line 243, in main
   run_python_file(filename, [filename] + args, argvu, file_package)
 File "pwb.py", line 95, in run_python_file
   main_mod.__dict__)
 File "./scripts/login.py", line 198, in <module>
   main()
 File "./scripts/login.py", line 168, in main
   site = pywikibot.Site()
 File "/home/wiki/web/Pywikibot/pywikibot/__init__.py", line 1233, in Site
   fam = Family.load(fam)
 File "/home/wiki/web/Pywikibot/pywikibot/tools/__init__.py", line 1738, in wrapper
   return obj(*__args, **__kw)
 File "/home/wiki/web/Pywikibot/pywikibot/family.py", line 988, in load
   raise UnknownFamily('Family %s does not exist' % fam)
pywikibot.exceptions.UnknownFamily: Family test does not exist
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.UnknownFamily'>

Please help me !

Malyacko (talkcontribs)

Off-topic here; see Manual:Pywikibot/Communication. Read the first line of the output that you posted: Make sure that your bot user has access rights to your user-config.py file. Currently it does not, as the very first line tells you.

Beginneruser (talkcontribs)

Hi Malyacko

I can login in to bot, not was problem.

Thanks

Malyacko (talkcontribs)

@Beginneruser: I have no idea what "I can login into bot" is supposed to mean, sorry. If you perform certain steps please provide the exact commands and exact output, to avoid misunderstandings. :) My question was about file access rights. It's not relevant if you can log into something or not.

Beginneruser (talkcontribs)