Page MenuHomePhabricator

Login with pywikibot loops on toollabs
Closed, DuplicatePublic

Description

When logging in to pywikibot on toollabs, I am getting a looping login, and it is new (for me) in the past couple of days

tools.wikisource-bot@tools-bastion-01:~$ python pwb.py login -user:wikisource-bot -debug -verbose
The base directory is /data/project/wikisource-bot/.pywikibot
Pywikibot rb1d2cc30c317fed7cfb8db4cc70c04f8913eb94b
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
Found 1 wikisource:en processes running, including this one.
Password for user Wikisource-bot on wikisource:en (no characters will be shown):
Logging in to wikisource:en as Wikisource-bot
Should be logged in now
Password for user Wikisource-bot on wikisource:en (no characters will be shown):
...

It is not a failed password error as that spits out a failed password error.

Version gives me ...

tools.wikisource-bot@tools-bastion-01:~$ python pwb.py version -user:wikisource-bot
Pywikibot: [https] r-pywikibot-core.git (e7e56d5, g3, 2015/08/15, 21:49:51, OUTDATED)
Release version: 2.0b3
requests version: 2.2.1
 cacerts: /etc/ssl/certs/ca-certificates.crt
   certificate test: ok
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
PYWIKIBOT2_DIR: /data/project/wikisource-bot/.pywikibot
PYWIKIBOT2_DIR_PWB:
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: /data/project/wikisource-bot/.pywikibot
Usernames for family "wikisource":
       el: wikisource-bot (no sysop configured)
...

Event Timeline

Billinghurst raised the priority of this task from to Needs Triage.
Billinghurst updated the task description. (Show Details)
Billinghurst added a project: Pywikibot.
Billinghurst subscribed.

with guidance I ran

python -c "import pywikibot; s = pywikibot.Site('en', 'wikisource'); s.login()"

and no loop

I encountered this once yesterday, and deleting pywikibot.lwp fixed it.
@XZise also reported a similar sequence on https://gerrit.wikimedia.org/r/#/c/231218/ PS 6

[…]and no loop

By the way this does not fix the issue here. Using the login script afterwards again causes the looping behavior. Afaik it's also looping when running a script.

It seems like I got that issue too but locally and using python setup.py nosetests --tests tests --verbosity=2 as the command.

I'm wondering if this might be caused by T110354: Login credentials are not kept between runs.
@XZise, did you reproduce it on a version prior to that fix?

I'm using https://gerrit.wikimedia.org/r/#/c/195100/8 which does not include the patch. But I haven't changed my cookie file at all and it happened out of the blue. And I'm a bit scared that switching branches might hide the problem again but I'll try implementing that on my own.

Okay it really seems that T110354 does fix it. Unfortunately I haven't backed up the cookie file from before so I could not verify that it's broken again when I undo the fix. Anyway I close it for now and wait if others experience that problem again.