Manual talk:Pywikibot/redirect.py

Bug with broken
Please find my bug below: my bot is administrator on fr.b (I could suppress a page manually with its account), and when I launch "redirect.py double" it works perfectly.

However, with "both" or "broken", no deletion is possible: he can see the broken redirections list, but when I enter "y" or launch the script "-always" it passes to the next entry without any page suppression. >python redirect.py broken -v Pywikipediabot [http] trunk/pywikipedia (r8359, 2010/07/15, 09:25:43) Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit (Intel)] Retrieving special page...

API action:query
meta: userinfo uiprop: blockinfo

Requesting API query from wikibooks:fr Note: this language does not allow global bots. Retrieved 52 redirects from special page.

>>> Paterson <<<

API action:query
inprop: protection|talkid|subjectid|url|readable rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: Paterson rvlimit: 1

Requesting API query from wikibooks:fr getting huge siprop magicwords...

API action:query
meta: siteinfo siprop: magicwords

Requesting API query from wikibooks:fr

API action:query
inprop: protection|talkid|subjectid|url|readable rvprop: content|ids|flags|timestamp|user|comment|size prop: revisions|info titles: Photographie/Fabricants/Paterson rvlimit: 1

Requesting API query from wikibooks:fr Redirect target Photographie/Fabricants/Paterson does not exist. Do you want to delete Paterson? ([y]es, [N]o, [a]ll, [q]uit) y

Getting information for site wikibooks:fr

API action:query
meta: userinfo uiprop: blockinfo|groups|rights|hasmsg|ratelimits|preferencestoken

Requesting API query from wikibooks:fr

>>> Arthur d'Arazien <<< ... JackPotte 20:17, 17 July 2010 (UTC)
 * After an SVN update it works. JackPotte 15:56, 9 April 2011 (UTC)

Bug with double
On this dictionary the bot couldn't find the destination page, probably because of the õ and/or ü into its name. JackPotte 04:20, 10 August 2010 (UTC)

i18n error
Hi! I was running, when I got this. I have no idea what it could be. I'running Version 9016 with ActivePython 2.7.1.4 Who can help me? Traceback (most recent call last): File "C:\Python27\redirect\pywikipedia\redirect.py", line 799, in    main File "C:\Python27\redirect\pywikipedia\redirect.py", line 795, in main bot.run File "C:\Python27\redirect\pywikipedia\redirect.py", line 711, in run self.fix_double_redirects File "C:\Python27\redirect\pywikipedia\redirect.py", line 539, in fix_double_redi rects self.fix_1_double_redirect(redir_name) File "C:\Python27\redirect\pywikipedia\redirect.py", line 664, in fix_1_double_re direct summary = i18n.twtranslate(self.site, msg_double) \ File "C:\Python27\redirect\pywikipedia\pywikibot\i18n.py", line 220, in twtransla te transdict = getattr(__import__("i18n", fromlist=[package]), package).msg ImportError: No module named i18n The file i18n.py is existing in the folder pywikibot, that fine. Thx a lot! --Plasmarelais 10:38, 6 March 2011 (UTC)
 * Could you please check the folders update, for example with Tortoise in Windows (after the installation right click on the pywikipedia directory and SVN Update...)? JackPotte 12:53, 6 March 2011 (UTC)

OK; I downloaded the Tortoise, installed, right click on the pywikipedia folder. It works! Thank you veryvery much, but I do not really know, what the turtle did? Just an update of the framework? I had the latest version yesterday o_O But thanks! --Plasmarelais 11:59, 7 March 2011 (UTC)

$wgCapitalLinks = false;
In my setting, I had $wgCapitalLinks = false; and about a hundred double redirection from something like "Article abc" to "Page abc" to "abc". How to make the redirect.py case sensitive, or if I can't do that, what code should I change so that I can fix those double redirects? Bennylin 14:15, 6 June 2011 (UTC)

Cannot fix or delete the broken redirect
Hello, when I'm trying to run this command on broken redirects, it can't delete them. I'm running it on simpsonswiki.com. It keeps coming up with the message "Cannot fix or delete the broken redirect". I have sysop powers and have given my bot these powers in the user-config and I can run delete.py okay so that's not the problem. I just can't figure out why it won't let me do this. Can anyone help? Thanks, Solar Dragon (talk) 17:28, 15 February 2015 (UTC)


 * (I should probably note that I am running core. I am unsure whether anything would be different if you are running compat.)


 * As far as I can tell, this is an issue with the wording on the error message being unclear. When it says that it can't delete the redirects, it actually means that it isn't being allowed to delete the redirects due to missing the  argument (which I just added a note about on the script page). So, if you are still having this problem, simply adding said argument to the script call should fix it. Oscuritaforze (talk) 05:42, 25 March 2015 (UTC)