Page MenuHomePhabricator

generate_user_files always sets en.wikipedia as default family/code
Closed, DuplicatePublic

Description

Steps to reproduce:

  • rm user-config.py
  • python generate_user_files.py
  • family: commons
  • lang: beta
  • username: fdsa
  • no other projects
  • no botpassword
  • python pwb.py login now results in:
pywikibot.exceptions.NoUsername: ERROR: Username for wikipedia:en is undefined.
If you have an account for that site, please add a line to user-config.py:

usernames['wikipedia']['en'] = 'myUsername'

The reason for this is that user-config.py contains:

family = 'wikipedia'

# The language code of the site we're working on.
mylang = 'en'
  • nano user-config.py
  • change family='wikipedia' to family='familywiki'
  • python3 pwb.py login
    • Now able to login

This is on commit 29f503efc3b009b0318add67e076571f81e88170.

Event Timeline

Is it normal that this task is only tagged pywikibot-bots-FLOSSbot and not Pywikibot ? :)

valhallasw renamed this task from Creating new family creates inappropriate user_config file to generate_user_files always sets en.wikipedia as default family/code.Jun 6 2018, 4:28 PM
valhallasw edited projects, added Pywikibot; removed pywikibot-bots-FLOSSbot.
valhallasw updated the task description. (Show Details)

Did some debugging; the issue seems that we always set family=wikipedia and code=en in generate_user_files.py; see the updated description.

Vvjjkkii renamed this task from generate_user_files always sets en.wikipedia as default family/code to njbaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from njbaaaaaaa to generate_user_files always sets en.wikipedia as default family/code.Jul 2 2018, 3:16 PM
CommunityTechBot closed this task as a duplicate.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.