[Mediawiki-api] Problem with mwclient and EditPage::attemptSave hook

Alexander Kanterakis makeabitm at gmail.com
Sun May 23 16:27:46 UTC 2010


Hi,

I 've setup mediawiki-1.15.1 with the following hook in LocalSettings.php:

$wgHooks['EditPage::attemptSave'][] = 'foo';

Foo is a simple function:

function foo($editpage) {
return true;
}

With this setup I 've noticed that I cannot save any page with mwclient (ver
0.6.4). The call:
page.save(newText)

raises the following exception:
  File "/lib/python2.6/json/decoder.py", line 338, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

When I comment out the hook then the save command works properly. Any
suggestions?

My system is a OSX 10.6.3

Thank you
Alex.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/mediawiki-api/attachments/20100523/f9ee3b01/attachment.htm 


More information about the Mediawiki-api mailing list