Bugs item #3535184, was opened at 2012-06-14 05:11
Message generated for change (Comment added) made by xqt
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3535184&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: rewrite
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: xqt (xqt)
>Assigned to: xqt (xqt)
Summary: WARNING: Logged in as IP insead of Bot

Initial Comment:
checking out the rewrite branch and copying the user files I runned touch.py 
and got an error as follows:

C:\pwb\rewrite>pwb.py touch user:xqt/Test -v -debug
Pywikipediabot r10326 2012-06-08 12:08:53Z
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
Retrieving 1 pages from wikipedia:de.
Starting 1 threads...
Found 1 wikipedia:de processes running, including this one.
WARNING: Logged in as 199.199.199.199 instead of Xqbot
Dropped throttle(s).
Traceback (most recent call last):
  File "C:\pwb\rewrite\pwb.py", line 42, in <module>
    execfile(sys.argv[0])
  File "C:\pwb\rewrite\scripts\touch.py", line 99, in <module>
    main()
  File "C:\pwb\rewrite\scripts\touch.py", line 94, in main
    bot.run()
  File "C:\pwb\rewrite\scripts\touch.py", line 47, in run
    page.save("Pywikibot touch script")
  File "C:\pwb\rewrite\pywikibot\page.py", line 735, in save
    if not force and not self.botMayEdit():
  File "C:\pwb\rewrite\pywikibot\page.py", line 670, in botMayEdit
    username = self.site.user()
  File "C:\pwb\rewrite\pywikibot\site.py", line 177, in user
    elif self.logged_in(False):
  File "C:\pwb\rewrite\pywikibot\site.py", line 692, in logged_in
    raise
TypeError: exceptions must be old-style classes or derived from BaseException, n
ot NoneType
Waiting for threads to finish...
All threads finished.
Dropped throttle(s).

C:\pwb\rewrite>

I've added the raise to get the traceback of the statement.

version.py:
Pywikibot branches/rewrite/ (r10359, 2012/06/12, 16:46:30)
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
unicode test: ok

C:\pwb\rewrite>


----------------------------------------------------------------------

>Comment By: xqt (xqt)
Date: 2012-06-20 15:48

Message:
enable explicit login with r10395

----------------------------------------------------------------------

Comment By: xqt (xqt)
Date: 2012-06-20 14:03

Message:
Another try I do not understand:

>>> import pwb
>>> import pywikibot as wp
>>> s = wp.getSite()
>>> s.logged_in()
False
>>> s._loginstatus
-3
>>> p = wp.Page(s, 'user:xqt/Test')
>>> from pywikibot import config2 as cf
>>> cf.cosmetic_changes = False
>>> p.text += '\n Test'
>>> s._loginstatus
-3
>>> s.logged_in()
True
>>> 

----------------------------------------------------------------------

Comment By: xqt (xqt)
Date: 2012-06-20 13:56

Message:
The next strangeness about login:

running
pwb.py login
gives
Not logged in on wikipedia:de

But changing a page with 
basic.py user:xqt/Test
shows the bor was logged in:
http://de.wikipedia.org/w/index.php?title=Benutzer%3AXqt%2FTest&diff=104620599&oldid=104409130

----------------------------------------------------------------------

Comment By: Russell Blau (russblau)
Date: 2012-06-14 09:29

Message:
This appears to be a result of
http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10284, which removed
code that automatically logged you in when you accessed the API.  A
work-around is to add an explicit "site.login()" call to every script.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3535184&group_id=93107

_______________________________________________
Pywikipedia-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-bugs

Reply via email to