Forum:Pywikipedia bot help

de:Forum:Pywikipedia in Wikias einsetzen

We at PathfinderWiki are in the process of reorganizing our category structure and would like to use a bot to aid lessen the tedium. I have installed pywikipedia and have successfully logged in (once) but now I'm getting the following error whenever I try to do anything to test out functionality. I don't know if my families page isn't formatted correctly or what, but here's the error I'm getting:

I found the answer to my problem.:

There is a script path variable in the family file that is hard-coded to /w/:

scriptpath(self, code):

return '/w'def

Changed to

return '/wiki'def

Original problem described below:

I am also having a problem running scripts. login.py works fine. I get

Error downloading data: No JSON object could be decoded Request en:/w/api.php?action=query&format=json&meta=userinfo&uiprop=blockinfo

My MediaWiki URL is http://mustang/wiki/index.php (not accessible from the Internet).

I have api.php istalled.

[root@mustang pywikipedia]# ls /var/www/html/w/api.php /var/www/html/w/api.php [root@mustang pywikipedia]#

I have sym linked /var/www/html/wiki/ (real folder) to /var/www/html/w/ (sym link)

I have searched for any scripts that have hardcoded references to /w/ and changed them to /wiki/.

It appears that some script is using a variable to build the /w/api.php? in the Request en:/w/api.php?action=query&format=json&meta=userinfo&uiprop=blockinfo and that it can't follow a symlinK?

Any help will be much appreciated.

---Robert

Can anyone offer any advice? I'm happy to also post my family file if that will help. --yoda8myhead 01:50, 1 August 2009 (UTC)


 * Can you do that please? Can use a pastebin. -- 13:14, 1 August 2009 (UTC)


 * Family file is here. I tried again last night and login worked with no errors but I got the above message every time I tried to do anything else. --yoda8myhead 16:20, 1 August 2009 (UTC)
 * If you click the link you'll see you get a 404. The API is right in the root directory.--AB 17:02, 1 August 2009 (UTC)


 * I have removed the '/w' from the offending line and am now able to run scripts, though some of them aren't working right. Could be my syntax.  Now, how do I get a bot tag? -- yoda8myhead 17:49, 1 August 2009 (UTC)
 * Help:Bots.--AB 18:17, 1 August 2009 (UTC)

AutoWikiBrowser can rename categories and is easier to use. -- ◄mendel► 03:03, 3 August 2009 (UTC)
 * Can AWB replace one category with two?--AB 04:09, 3 August 2009 (UTC)
 * Using the regular search and replace, yes. -- ◄mendel► 19:17, 3 August 2009 (UTC)

Family file writing
Can I define a default namespace name, and then somehow indicate for single subwikis that these don't have this namespace set up? E.g., blog namespaces.--AB 17:50, 7 August 2009 (UTC)


 * Well, I'm not sure what you mean. You can Contact Wikia to set up an default namespace, but you can't give any sub-Wiki's this namespace, you'll have to move them to the name (i.e. "Blog:Example" to "Blogs:Example"). You can use a bot to view Special:PrefixIndex and make the bot add a category like "Namespace incorrect" on alle pages on this page. Mark (Tedjuh10) - Talk 17:04, 22 August 2009 (UTC)
 * I mean the creation of a family.py file. I have to define (custom) namespaces. But since one wiki doesn't have blogs activated, I reckon I have to define the blog namespace for every other wiki manually, since else, with the declaration of a default namespace, I would define a blog namespace that doesn't exist.--AB 19:48, 22 August 2009 (UTC)
 * In reality you wouldn't your bot on blogs anyway so even defining it is pointless. It wouldn't kill you to just not include it if you don't need it...  ~Joey~    ^Talk^  00:24, 23 August 2009 (UTC)