Creating mwlib with only one line: "No JSON object could be decoded"

From Tronche's wiki
Jump to: navigation, search


Heck, I'm trying to use mwlib (like they describe here), I've only two lines, like in the tutorial:

import mwclient
site = mwclient.Site('mysite.com', path='/wiki/')

And I got an error "No JSON object could be decoded". How on the earth can a one line program have an error ???

Most likely, you're using URL rewriting to get short URL (like /wiki/Nice_page, rather than /mediawiki?index.php?title=Nice_page). To use API, you must access the real path, that is /mediawiki/api.php


Anonymous user #1

270 days ago
Score 0+-

as

as

Anonymous user #1

270 days ago
Score 0+-

{ "version": 1, "range": { "id": "workday", "input": { "init": { "datastreamId": "workerAreaIn", "value": "BuildingSite" }, "end": { "datastreamId": "workerAreaOut", "value": "BuildingSite" } }, "filter": { "organization": [ "base_organization", "default_organization", "Fadhili", "organization_Anabel", "organization_Lebana" ] }, "interval": "0 0/10 * * * ?" }

}
Add your comment
Tronche's wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.

Personal tools