Bugs item #2926171, was opened at 2010-01-05 12:16
Message generated for change (Comment added) made by xqt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=292617…
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: login
Group: None
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Yr Wyddfa (yrwyddfa)
Assigned to: xqt (xqt)
Summary: Errorkey: query
Initial Comment:
Hi!
I've got a problem activating pywikipediabot - scripts at our private wiki, and since
today, the same error message while logging in.
I'm using Linux ubuntu 9.04 and MediaWiki 1.14.0
Here is the terminal output:
/pywikipedia$ python login.py
Password for user weBot on Dairpedia:de:
Logging in to Dairpedia:de as weBot
Traceback (most recent call last):
File "login.py", line 397, in <module>
main()
File "login.py", line 393, in main
loginMan.login()
File "login.py", line 282, in login
cookiedata = self.getCookie(api)
File "login.py", line 170, in getCookie
response, data = self.site.postData(address, self.site.urlEncode(predata),
sysop=self.sysop)
File "/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py",
line 5897, in postData
self._getUserDataOld(text, sysop = sysop)
File "/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py",
line 6168, in _getUserDataOld
blocked = self._getBlock(sysop = sysop)
File "/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py",
line 5500, in _getBlock
data = query.GetData(params, self)['query']['userinfo']
KeyError: 'query'
This KeyError also occured, when the login was successful and I tried to start any
script.
Please tell me if you need any additional data.
Thanks a lot in advance!
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-01-09 19:37
Message:
This would be my next question about and asking for the family filr and the
URLs. :)
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2010-01-09 11:53
Message:
Me again ;)
I searched a bit in the folder structure of our server and found something
interesting: There is a folder called "/w" (as for the standard folder of
our wiki is "/wiki"). So I talked to our Server-admin and he told me that
he created the folder and an api.php which redirects to the api.php in the
/wiki folder. The reason was: login.py always tries to call a non
existing /w/api.php, even
def path(self, code):
return '/wiki'
is enabled in the _family.py
But I guess this should be solved in a separate thread, so this one could
be marked as "solved" - sorry for that!
----------------------------------------------------------------------
Comment By: Yr Wyddfa (yrwyddfa)
Date: 2010-01-06 00:06
Message:
Using the -verbose option the terminal gives back these informations:
/pywikipedia$ python login.py -verbose
Pywikipediabot [http] trunk/pywikipedia (r7850, 2010/01/02, 12:59:20)
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3]
Password for user weBot on Dairpedia:de:
Logging in to Dairpedia:de as weBot
==== API action:query ====
meta: userinfo
uiprop: blockinfo
----------------
Requesting API query from Dairpedia:de
Traceback (most recent call last):
File "login.py", line 397, in <module>
main()
File "login.py", line 393, in main
loginMan.login()
File "login.py", line 282, in login
cookiedata = self.getCookie(api)
File "login.py", line 170, in getCookie
response, data = self.site.postData(address,
self.site.urlEncode(predata), sysop=self.sysop)
File
"/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py", line
5897, in postData
self._getUserDataOld(text, sysop = sysop)
File
"/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py", line
6168, in _getUserDataOld
blocked = self._getBlock(sysop = sysop)
File
"/home/heiko/Dokumente/DairAlainn/Dairpedia/pywikipedia/wikipedia.py", line
5500, in _getBlock
data = query.GetData(params, self)['query']['userinfo']
KeyError: 'query'
I added your suggested lines into my user_config.py to disable API.
Unfortunately the terminal output was exactly the same.
Could the version of my python (v. 2.6.2) be the problem? I heard about
several compatibility problems with python 3.0 so I didn't install that
version.
Thanx for your time!
----------------------------------------------------------------------
Comment By: xqt (xqt)
Date: 2010-01-05 18:51
Message:
migth be a bug. Please try again with -verbose option to get more
information about this. It seems the structure has been changed after mw
1.14
You also could try to run your bot with api disabled. Just put the
following statements in your user-config.py:
use_api = False
use_api_login = False
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=292617…