https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Bug ID: 61832 Summary: Login seems not to work. Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: login.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: bugzilla.wikimedia@publi.purodha.net CC: bugzilla.wikimedia@publi.purodha.net Web browser: --- Mobile Platform: ---
After a fresh checkout from git, python pwb.py login -family:i18n -lang:i18n asks for a password, says the bot was logged in, but subsequent actions ask for a passwort again.
The files mentioned in the documentation are not created. There is a file pywikibot.lwp that has the cookies related to the wiki.
purodha@tools-dev:~/pywikibot$ python pwb.py version Pywikibot: [ssh] pywikibot-core.git (e553f36, g2767, 2014/02/23, 15:09:44, ok) Release version: 2.0b1 Python: 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] unicode test: ok purodha@tools-dev:~/pywikibot$ python pwb.py login -family:i18n -lang:i18n Password for user Purbo_T on i18n:i18n (no characters will be shown): Logging in to i18n:i18n as Purbo_T Logged in on i18n:i18n as Purbo T. purodha@tools-dev:~/pywikibot$ python pwb.py pagefromfile -file:/tmp/purodha-pagefromfile-test -appendbottom -nocontent:/try Reading '/tmp/purodha-pagefromfile-test'...
User:Purodha/try <<<
Password for user Purbo_T on i18n:i18n (no characters will be shown):
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |valhallasw@arctus.nl
--- Comment #1 from Merlijn van Deen valhallasw@arctus.nl --- Could you post your user-config.py?
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
--- Comment #2 from Purodha Blissenbach bugzilla.wikimedia@publi.purodha.net --- Thanks for the hint. Here's the problem:
user-config.py: usernames['i18n']['i18n'] = u'Purbo_T'
pywikibot.lwp: Set-Cookie3: translatewiki_net_bw_UserName="Purbo+T"; path="/"; domain="translatewiki.net"; path_spec; expires="2014-08-22 21:18:35Z"; httponly=None; version=0
The equivalence of " ", "_", "+" inside the user name in various contexts is not properly taken unto account.
Altering user-config.py to: usernames['i18n']['i18n'] = u'Purbo T'
finds the user logged in.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easy
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- It's just the _ in the user name -- we determine user names like this:
if not self.nocapitalize:
if user: user = user[0].upper() + user[1:]
if sysop: sysop = sysop[0].upper() + sysop[1:]
(site.py)
and compare that to what the API returns (which is a capitalized-or-not name with spaces, not underscores).
The better solution would be to either a) normalize the username (with a Page object -- which I guess is OK because Page objects are used more often in Site) or b) comparing the usernames with site.sametitle (which currently does not take underscores into account, but should)
Marking as 'easy' for anyone willing to pick up option a)
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |core (2.0) Summary|Login seems not to work. |User name localization does | |not take underscores into | |account
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|User name localization does |User name normalization |not take underscores into |does not take underscores |account |into account
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
--- Comment #4 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 117689 had a related patch set uploaded by Purodha: Bug: 61832 - fixed.
https://gerrit.wikimedia.org/r/117689
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 119882 had a related patch set uploaded by Tim Landscheidt: become: Add --help option
https://gerrit.wikimedia.org/r/119882
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Tim Landscheidt tim@tim-landscheidt.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tim@tim-landscheidt.de
--- Comment #6 from Tim Landscheidt tim@tim-landscheidt.de --- Sorry, comment #5 was a typo of mine.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Ricordisamoa ricordisamoa@openmailbox.org --- https://gerrit.wikimedia.org/r/117689 merged.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
--- Comment #8 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 150872 had a related patch set uploaded by John Vandenberg: WIP: Introduce static method Link.normalize(title)
https://gerrit.wikimedia.org/r/150872
https://bugzilla.wikimedia.org/show_bug.cgi?id=61832
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |PATCH_TO_REVIEW Resolution|FIXED |---
pywikipedia-bugs@lists.wikimedia.org