I am trying to setup Pywikipedia (r7665 (wikipedia.py), 2009/11/17, 12:24:54)
The login.py script works.
Using the addtext.py script fails with the text below:
<addtext.py>
python-2.4.3 add_text.py -cat:Bot_Test -text:"another bot test" -down Getting [[Category:Bot Test]]... Loading Bot Test Page... Error downloading data: No JSON object could be decoded Request en:/w/api.php?inprop=protection%7Ctalkid%7Csubjectid%7Curl%7Creadable&fo rmat=json&rvprop=content%7Cids%7Cflags%7Ctimestamp%7Cuser%7Ccomment%7Csi ze&prop=revisions%7Cinfo&titles=Bot+Test+Page&rvlimit=1&action=query Retrying in 1 minutes... ^CTraceback (most recent call last): File "add_text.py", line 312, in ? main() File "add_text.py", line 308, in main (text, newtext, always) = add_text(page, addText, summary, regexSkip, regexSkipUrl, always, up, True) File "add_text.py", line 147, in add_text text = page.get() File "/auto/docwiki-bot/pywikipedia/wikipedia.py", line 684, in get self._contents = self._getEditPage(get_redirect = get_redirect, throttle = throttle, sysop = sysop) File "/auto/docwiki-bot/pywikipedia/wikipedia.py", line 752, in _getEditPage data = query.GetData(params, self.site(), sysop=sysop) File "/auto/docwiki-bot/pywikipedia/query.py", line 153, in GetData time.sleep(retry_idle_time*60) KeyboardInterrupt sjc-cde-003:27>
</addtext.py>
Based on the inprop=protection part of the error, I disabled the AuthorProtect extension and tried again:
Failed, but for a different reason:
<addtext.py - AuthorProtection = off>
python-2.4.3 add_text.py -cat:Bot_Test -text:"another bot test" -down Getting [[Category:Bot Test]]... Loading Bot Test Page...
Bot Test Page <<<
+ another bot test
Do you want to accept these changes? ([y]es, [N]o, [a]ll) a Updating page [[Bot Test Page]] via API Unknown Error. API Error code:unknown_action Information:Unrecognized value for parameter 'action': edit Loading Meta-tag-test...
Meta-tag-test <<<
+ another bot test
Sleeping for 9.3 seconds, 2009-11-24 08:01:28 Updating page [[Meta-tag-test]] via API Unknown Error. API Error code:unknown_action Information:Unrecognized value for parameter 'action': edit
</addtext.py - AuthorProtection = off>
Site info below:
Here is my Pywikipedia information:
uname -a SunOS sjc-cde-003 5.10 Generic_137111-06 sun4v sparc SUNW,SPARC-Enterprise-T5120
python-2.4.3 version.py Pywikipedia (r7665 (wikipedia.py), 2009/11/17, 12:24:54) Python 2.4.3 (#1, Sep 8 2006, 16:46:00) [GCC 3.3.3]
Here is my Wikipedia information:
uname -a Linux emerac.cisco.com 2.6.18-92.1.18.el5xen #1 SMP Wed Nov 5 09:30:07 EST 2008 i686 i686 i386 GNU/Linux
MediaWiki 1.13.5 PHP 5.1.6 (apache2handler) MySQL 5.0.45
Extensions:
Special pages CategoryTree (Version r37574) Dynamically navigate the category structure Daniel Kinzler
Contribution Scores (Version 1.11) Polls the wiki database for highest user contribution volume Tim Laqua
Flagged Revisions (Version 1.094) Gives editors and reviewers the ability to validate revisions and stabilize pages Aaron Schulz and Joerg Baach
MultipleUpload (Version 1.0) Allows users to upload several files at once Travis Derouin
PdfExport (Version 2.0 (4-November-2008)) renders a page as pdf Thomas Hempel Parser hooks
BreadCrumbs Shows a breadcrumb navigation. Based heavily on Manuel Shneider's extension[1] Kimon Andreou
CategoryTree (Version r37574) Dynamically navigate the category structure Daniel Kinzler
EmailForm (Version 0.8a) Inserts a form mailer into a page Eric Hartwell (Minor fixes by John Adams
ImageMap (Version r35980) Allows client-side clickable image maps using <imagemap> tag Tim Starling
InputBox Allow inclusion of predefined HTML forms Erik Moeller, Leonardo Pimenta, Rob Church and Trevor Parscal
MetaTag (Version 0.1) Tag to inject meta tags into page header. Jim Wilson - wilson.jim.r<at>gmail.com
ParserFunctions (Version 1.1.1) Enhance parser with logical functions Tim Starling
PdfBook (Version 1.0.3, 2008-12-09) Composes a book from articles in a category and exports as a PDF book
User:Nad Rating Bar (Version 1.0 rc1) Display a rating bar using Ajax. Franck Dernoncourt and PatheticCockroach Other
Author Protect (Version 1.1) Allows the author of a page to protect it from other users Ryan Schmidt
FCKeditor (Version 1.0.1) Allow editing using the WYSIWYG editor FCKeditor Frederico Caldeira Knabben, Jack Phoenix, Wiktor Walc and others
Gadgets Lets users select custom CSS and JavaScript gadgets in their preferences Daniel Kinzler
JSKitRating (Version 1.4.0) Provides integration with JSKit Rating tool. Jean-Lou Dupont
LDAP Authentication Plugin (Version 1.1g) LDAP Authentication plugin with support for multiple LDAP authentication methods Ryan Lane
SecureHTML (Version 2.3.0) Enables secure HTML code on protected pages Jean-Lou Dupont
StubManager (Version 1.3.0) Provides stubbing facility for extensions handling rare events. Customization template: MediaWiki:ExtensionState. Extensions registered:JSKitRating, SecureHTML. Jean-Lou Dupont
Extension functions lambda_54, efCategoryTree, efLoadFlaggedRevs, setupMetaTagParserHooks, wfEmailFormExtension, wfMultipleUpload, wfRatingBar, wfSetupParserFunctions, wfSetupPdfBook and (BreadCrumbs, setup)
Parser extension tags <categorytree>, <emailform>, <imagemap>, <inputbox>, <meta>, <pre>, <w4g_ratingbar> and <w4g_ratinglist>
Parser function hooks anchorencode, categorytree, cscore, defaultsort, displaytitle, expr, filepath, formatnum, fullurl, fullurle, grammar, html, if, ifeq, iferror, ifexist, ifexpr, int, jskitrating, language, lc, lcfirst, localurl, localurle, ns, numberofadmins, numberofarticles, numberofedits, numberoffiles, numberofpages, numberofusers, padleft, padright, pagesincategory, pagesize, plural, rel2abs, shtml, special, switch, tag, time, timel, titleparts, uc, ucfirst and urlencode
---Robert