#1157 login.py

closed-fixed
xqt
login (24)
5
2010-06-29
2010-04-07
Anonymous
No

Since the change of the API (url) my bot (and some others, after discussion on IRC) can not connect and it's wrote on the consol the error message: "Login failed. Wrong password or CAPTCHA answer?" despite that the correct password is entered and that no captcha is answered on the browser!

Discussion

1 2 > >> (Page 1 of 2)
  • Harriv

    Harriv - 2010-04-07

    This should be high priority, since no pywikipedia bot can login Wikipedia before this is resolved.

     
  • Multichill

    Multichill - 2010-04-07
    • assigned_to: nobody --> russblau
     
  • Multichill

    Multichill - 2010-04-07

    Looks like this was fixed in 8061 by russblau. I assigned the bug to him.

     
  • Russell Blau

    Russell Blau - 2010-04-07

    It should be fixed for everyone using API login (need the line use_api_login = True in user-config.py). If there is anyone out there not using API login, you need to change your user-config file.

     
  • Russell Blau

    Russell Blau - 2010-04-07
    • priority: 5 --> 9
    • status: open --> pending-fixed
     
  • André Malafaya Baptista

    I was since I had problems with API login not working properly and requiring the bot to re-login (unsuccessfully) on every edit.
    I just retried API login but I get an exception while logging in to en.wikipedia (only en.wikipedia and not anywhere else so far):

    Logging in to wikipedia:en as MalafayaBot via API.
    Should be logged in now
    Traceback (most recent call last):
    File "D:\Work\pywikipedia\login.py", line 413, in <module>
    main()
    File "D:\Work\pywikipedia\login.py", line 409, in main
    loginMan.login()
    File "D:\Work\pywikipedia\login.py", line 306, in login
    if not self.botAllowed():
    File "D:\Work\pywikipedia\login.py", line 119, in botAllowed
    for linkedPage in botListPage.linkedPages():
    File "D:\Work\pywikipedia\wikipedia.py", line 2194, in linkedPages
    thistxt = removeLanguageLinks(self.get(get_redirect=True),
    File "D:\Work\pywikipedia\wikipedia.py", line 618, in get
    self._contents = self._getEditPage(get_redirect = get_redirect, throttle = t
    hrottle, sysop = sysop)
    File "D:\Work\pywikipedia\wikipedia.py", line 688, in _getEditPage
    raise NoPage(self.site(), self.aslink(forceInterwiki = True),"Page does not
    exist. In rare cases, if you are certain the page does exist, look into overridi
    ng family.RversionTab" )
    pywikibot.exceptions.NoPage: (wikipedia:en, u'[[en:Wikipedia:Bot/Status]]', 'Pag
    e does not exist. In rare cases, if you are certain the page does exist, look in
    to overriding family.RversionTab')

    Version info:
    Pywikipedia [http] trunk/pywikipedia (r8061, 2010/04/07, 14:37:56)
    Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]

     
  • André Malafaya Baptista

    It seems to be linked to xqt's changeset #8055 where the bot status page is changed to Wikipedia:Bot/Status. In en.wikipedia, this is (still) Wikipedia:Bots/Status (plural form).
    What's the fix?

     
  • Russell Blau

    Russell Blau - 2010-04-07

    That typo is really a separate bug, but it's fixed in r8062 [anyway, I think your bot is logged in even though you got the error message]

     
  • André Malafaya Baptista

    Yes, it should be separate but only on my second comment I got sure of it :)
    anyway, I now get :
    Should be logged in now
    *** Your username is not listed on [[Wikipedia:Bots/Status]].
    *** Please make sure you are allowed to use the robot before actually using it!

    But my bot is listed there. Maybe the physical text has changed...
    Thanks

     
  • rubin16

    rubin16 - 2010-04-09

    still doesn't work for my bot and some others in ru.wiki

    C:\pt>python login.py
    Password for user Rubinbot on wikipedia:ru:
    Logging in to wikipedia:ru as Rubinbot
    Login failed. Wrong password or CAPTCHA answer?

    C:\pt>python version.py
    Pywikipedia [http] trunk/pywikipedia (r8069, 2010/04/09, 11:13:53)
    Python 2.6.3 (r263:75183, Oct 5 2009, 14:41:55) [MSC v.1500 32 bit (Intel)]

    I've checked - the password is correct, I've tryed to create new user-config.py - it doesn't work. I think this bug shouldn't be marked as fixed yet

     
  • rubin16

    rubin16 - 2010-04-09
    • status: pending-fixed --> open-fixed
     
  • Nobody/Anonymous

    Still doesn't work for my bot too. My bot doesn't want to connect any more on wikipedia even after updating pywikipedia.

    python login.py
    Password for user ZéroBot on wikipedia:fr:
    Logging in to wikipedia:fr as ZéroBot
    Login failed. Wrong password or CAPTCHA answer?

    Configuration : Mac OS X 10.6.3

    python version.py
    Pywikipedia [http] trunk/pywikipedia (r8069, 2010/04/09, 11:13:53)
    Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
    [GCC 4.0.1 (Apple Inc. build 5493)]

     
  • xqt

    xqt - 2010-04-09

    Please confirm that your user-config.py contains the following line:

    use_api_login = False

    use double verbose option -v -v for the next tries and give us the result.
    First use -clean option to ensure you are logged out and the cookies are deleted.
    Verify that the file <family>-<lang>-<user>-login.data does not exist,
    for example wikipedia-fr-ZéroBot-login.data
    Verify there is no remaining <family>-<user>-central-login.data
    Try again to login (with -force option):
    login.py -force -v -v

     
  • xqt

    xqt - 2010-04-09

    Sorry, must be

    use_api_login = True

    I'll make it as default

     
  • Toto Azéro

    Toto Azéro - 2010-04-09

    Yes, my user-config.py contains that line :

    use_api_login = True

    I've checked that there is no file type <family> - <lang> - <user>-login.data in the "login-data" folder.
    And there isn't any file called "fr-ZéroBot-central-login.data" (<family>-<lang>-<user>-login.data).

    I've use the -clean option and I've tried to log in again with the -v -v and -force options. I can observe that (I've replaced bot's password by ***) :

    Pywikipediabot [http] trunk/pywikipedia (r8069, 2010/04/09, 11:13:53)
    Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)
    [GCC 4.0.1 (Apple Inc. build 5493)]
    WARNING: Using -v -v on login.py might leak private data. When sharing, please double check your password is not readable and log out your bots session.
    Password for user ZéroBot on wikipedia:fr:
    Logging in to wikipedia:fr as ZéroBot via API.
    ==== API action:login ====
    lgname: ZéroBot
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: 1cbee4b71ee3c03363e1d85b79dc5fba
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: be0f42b9b6778203a80ab0171d5cc346
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: f45811161005473d48511a18a5bebe7d
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: 409f6a00197bbeed539b33c23430f43f
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: b129317b65966dd3477020e6949b691f
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr
    ==== API action:login ====
    lgname: ZéroBot
    lgtoken: 8d1d95b7b6f4f865829b3fd98bdfaf25
    lgpassword: ***
    ----------------
    Requesting API query from wikipedia:fr

    This suite keeps repeating but each time, the value of lgtoken is different.

     
  • xqt

    xqt - 2010-04-09
    • assigned_to: russblau --> xqt
     
  • xqt

    xqt - 2010-04-09

    I have it!
    Fix coming soon...

     
  • xqt

    xqt - 2010-04-09
    • status: open-fixed --> pending-fixed
     
  • xqt

    xqt - 2010-04-09

    Q&D-Fix in 8071
    and
    use_api_login = True
    per default in config.py
    Sorry for this hack, but my time is over for now. Maybe a cleaner code is coming soom (asap)

     
  • Toto Azéro

    Toto Azéro - 2010-04-09
    • status: pending-fixed --> open-fixed
     
  • Toto Azéro

    Toto Azéro - 2010-04-09

    OK thanks ! that work well in r8072 !

     
  • xqt

    xqt - 2010-04-09
    • status: open-fixed --> closed-fixed
     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-06-22

    Does NOT work for me on Python 2.6.4. :(

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks