I'm using Mediawiki v1.15.4 on my wiki, but I can't access the api from a script for some reason. I'm using the python wikitools library, and I can access wikipedia's api just fine, and several other wikis... but not the one for my wiki. I get this error (it's a python error so it might not make much sense):
Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> site = wiki.Wiki("http://www.WIKISITE/wiki/api.php") File "C:\Python26\lib\site-packages\wikitools\wiki.py", line 79, in __init__ self.setSiteinfo() File "C:\Python26\lib\site-packages\wikitools\wiki.py", line 97, in setSiteinfo info = req.query() File "C:\Python26\lib\site-packages\wikitools\api.py", line 140, in query data = self.__parseJSON(rawdata) File "C:\Python26\lib\site-packages\wikitools\api.py", line 254, in __parseJSON data.seek(0) AttributeError: addinfourl instance has no attribute 'seek'
it's like it can't find the api page? When I browse out to my wiki, I can browse to the api page, and like I said, I can access other wikis from that same machine, same script, etc, just not mine.
Any help here? Thanks!
I know the link is malformed, too, I just edited that since I don't want to publicize my wiki's url right now.
2010/7/23 Python Script pythsc@gmail.com:
it's like it can't find the api page? When I browse out to my wiki, I can browse to the api page, and like I said, I can access other wikis from that same machine, same script, etc, just not mine.
If you can browse to api.php, that suggests the API isn't broken. Double-check the URL is correct, that's all the help I can offer.
Roan Kattouw (Catrope)
What's your wiki.py and api.py? I guess it's their fault.
--Liangent
On 7/23/10, Roan Kattouw roan.kattouw@gmail.com wrote:
2010/7/23 Python Script pythsc@gmail.com:
it's like it can't find the api page? When I browse out to my wiki, I can browse to the api page, and like I said, I can access other wikis from that same machine, same script, etc, just not mine.
If you can browse to api.php, that suggests the API isn't broken. Double-check the URL is correct, that's all the help I can offer.
Roan Kattouw (Catrope)
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
the api.php file is located at the same place as your index.php, the so called "root". usually not a url with /wiki/
example: http://foo/api.php
Hello sir,
Yes I know that. In our case it's sitting at http://wiki.softwareprojects.com/api.php
On Tue, Jul 27, 2010 at 9:44 AM, C Stafford c.stafford@gmail.com wrote:
the api.php file is located at the same place as your index.php, the so called "root". usually not a url with /wiki/
example: http://foo/api.php
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
in the very first email
site = wiki.Wiki("http://www.WIKISITE/wiki/api.php")
On Tue, Jul 27, 2010 at 2:56 AM, Itamar Arjuan itamar.arjuan@gmail.com wrote:
Hello sir, Yes I know that. In our case it's sitting at http://wiki.softwareprojects.com/api.php
On 27/07/10 07:56, Itamar Arjuan wrote:
Hello sir,
Yes I know that. In our case it's sitting at http://wiki.softwareprojects.com/api.php
Unless you are also the person "Python Script pythsc@gmail.com" then the message was not in reply to you. The topic for this thread is "can't access my wiki's api using v1.15.4?" - your thread is called "Problem auto logining in a person to our mediawiki". As a public mailing list there are quite often more than one ongoing discussions.
Best Regards
Jools
Hi Jools,
Yes , I noticed it later on !
Do you know anyone who might be able to help on my thread ?
On Tue, Jul 27, 2010 at 10:26 AM, Jools Wills buzz@exotica.org.uk wrote:
On 27/07/10 07:56, Itamar Arjuan wrote:
Hello sir,
Yes I know that. In our case it's sitting at http://wiki.softwareprojects.com/api.php
Unless you are also the person "Python Script pythsc@gmail.com" then the message was not in reply to you. The topic for this thread is "can't access my wiki's api using v1.15.4?" - your thread is called "Problem auto logining in a person to our mediawiki". As a public mailing list there are quite often more than one ongoing discussions.
Best Regards
Jools
mediawiki-api@lists.wikimedia.org