Page MenuHomePhabricator

username settings for single-site families do not work with arbitrary values of config.mylang
Open, LowestPublic

Description

User config file used by JeremyB

From JeremyB via IRC.

21:55 < jeremyb> valhalla1w: i think maybe i even discussed my not staying logged in problem with you a couple months ago?
21:55 < jeremyb> with upload.py after running login.py
21:56 < jeremyb> i was getting prompted for password and periodically hit some kind of wrong passwd throttle and it didn't seem to matter whether the password i entered was accurate or not
21:56 < jeremyb> (i could enter garbage and hit enter and the upload would still maybe succeed)
21:56 < jeremyb> adding -lang to command line drastically improved things (and it stopped prompting for passwd)
23:01 < jeremyb> home seems to be enwiki. commons is an addition on the very last line of user-config.py

Command to reproduce should be:

23:12 < jeremyb> 08 01:10:32 < jeremyb> $ for c in $(ls -1 ???_ocha.txt | cut -d _ -f 1 | sed -n 135,146p); do python  /shared/pywikipedia/core/scripts/upload.py -v -family:commons -log -noverify -filename:"$(<"$c"_ocha.name)"  "${c}_ocha.svg" "$(<"$c"_ocha.txt)"; date -R; done
23:13 < jeremyb> valhalla1w: i did definitely do login.py -v -all
23:13 < jeremyb> and login.py -v -all -test
23:13 < jeremyb> (but unsure of parameter order)

Version: core-(2.0)
Severity: normal

Attached:

Details

Reference
bz65044

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:10 AM
bzimport set Reference to bz65044.
bzimport added a subscriber: Unknown Object (????).

Ive seen similar issues before, if mylang = 'en' or anything but 'commons' pywiki tends to not work correctly. I suspect that the only reason that this is working part of the time is because of the global login cookie and that the framework isnt getting the correct local cookies when it attempts to use the 'en' language project. By defining the language as 'commons' you bypass that. I suspect its an issue dealing with the way we construct project/language/user configs.
IE usernames['commons']['commons'] = username when we set mylang='en' it attempts to use usernames['commons']['en'] = username and has issues. By forcing the -lang param it makes the framework ignore the mylang setting in user config.

  • Bug 55224 has been marked as a duplicate of this bug. ***
jayvdb set Security to None.
jayvdb added a project: Pywikibot-login.py.
jayvdb subscribed.
Xqt lowered the priority of this task from High to Lowest.Feb 7 2019, 4:07 PM
Xqt subscribed.

Currently you have to define a -lang for a given -family. This is a feature request to simplify settings but not a bug. See my proposal at T71255.