Bugs item #3159076, was opened at 2011-01-16 02:48
Message generated for change (Comment added) made by herculefr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hercule (herculefr)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash with remove option on category.py
Initial Comment:
Hello,
I can't use category.py with remove option. The full log is :
>category.py remove
Please enter the name of the category that should be removed: Wikipédia:Film
Traceback (most recent call last):
File "XXX\category.py", line 1188, in <module>
main()
File "XXX\category.py", line 1147, in main
useSummaryForDeletion, inPlace=inPlace)
File "XXX\category.py", line 727, in __init__
self.cat = catlib.Category(self.site, catTitle)
File "XXX\catlib.py", line 71, in __init__
raise ValueError(u'BUG: %s is not in the category namespace!' % title)
ValueError
version.py :
Pywikipedia [http] trunk/pywikipedia (r8830, 2011/01/15, 17:50:15)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Hercule (herculefr)
Date: 2011-01-16 11:33
Message:
It works with Category:Wikipédia:Film
I think that the par:ameters should be unified : without "Category:" for
everyone
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-16 10:10
Message:
Have you tried using Category:Wikipédia:Film ?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Bugs item #3159076, was opened at 2011-01-16 02:48
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hercule (herculefr)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash with remove option on category.py
Initial Comment:
Hello,
I can't use category.py with remove option. The full log is :
>category.py remove
Please enter the name of the category that should be removed: Wikipédia:Film
Traceback (most recent call last):
File "XXX\category.py", line 1188, in <module>
main()
File "XXX\category.py", line 1147, in main
useSummaryForDeletion, inPlace=inPlace)
File "XXX\category.py", line 727, in __init__
self.cat = catlib.Category(self.site, catTitle)
File "XXX\catlib.py", line 71, in __init__
raise ValueError(u'BUG: %s is not in the category namespace!' % title)
ValueError
version.py :
Pywikipedia [http] trunk/pywikipedia (r8830, 2011/01/15, 17:50:15)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-16 10:10
Message:
Have you tried using Category:Wikipédia:Film ?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Bugs item #3159076, was opened at 2011-01-16 02:48
Message generated for change (Tracker Item Submitted) made by herculefr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Hercule (herculefr)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash with remove option on category.py
Initial Comment:
Hello,
I can't use category.py with remove option. The full log is :
>category.py remove
Please enter the name of the category that should be removed: Wikipédia:Film
Traceback (most recent call last):
File "XXX\category.py", line 1188, in <module>
main()
File "XXX\category.py", line 1147, in main
useSummaryForDeletion, inPlace=inPlace)
File "XXX\category.py", line 727, in __init__
self.cat = catlib.Category(self.site, catTitle)
File "XXX\catlib.py", line 71, in __init__
raise ValueError(u'BUG: %s is not in the category namespace!' % title)
ValueError
version.py :
Pywikipedia [http] trunk/pywikipedia (r8830, 2011/01/15, 17:50:15)
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3159076&group_…
Bugs item #3158761, was opened at 2011-01-15 10:17
Message generated for change (Comment added) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158761&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bináris (binbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: Template exception overworks in replace.py
Initial Comment:
I correct spelling mistakes with replace.py, and use exception:
'exceptions': {
'inside-tags': [
'hyperlink',
'template',
],
etc. as shown at http://meta.wikimedia.org/wiki/Pywikipediabot/replace.py/it
This exception excludes a lot of text that should be replaced! After a long investigation I suspect that the problem may exist when the template is complicated, e. g. the article begins with an infobox. The bot probably thinks to be inside of the template when it is already closed.
Examples:
In the last sentence of section http://hu.wikipedia.org/w/index.php?title=Nagyv%C3%A1rad&oldid=9085449#N.C3… the word "telepitettek" was not found. The article begins with an infobox.
In the middle of section http://hu.wikipedia.org/w/index.php?title=Opera_%28sz%C3%ADnm%C5%B1%29&oldi… the word "Szenitávnéji" was not found. The article has no infobox, but the text is preceeded by some templates with parameters, one of them at the very beginning.
In section http://hu.wikipedia.org/w/index.php?title=Tennessee&oldid=9028125#Megy.C3.A… the word "alapitási" was not found. The article begins with an infobox.
But:
The bot made the replacement here: http://hu.wikipedia.org/w/index.php?title=Mozilla&diff=9106942&oldid=8920815
This is also preceeded by some templates, which have parameters, but the one at the beginning of the article has no parameters. Does this make the difference?
All the above mentioned instances were found by the bot when I commented the word "template" out of the exceptions.
Not clear whether the bug is in replace.py or pagegenerators.
----------------------------------------------------------------------
>Comment By: Bináris (binbot)
Date: 2011-01-15 23:36
Message:
Hurray, I have caught it! The bugfix is easy. In pywikibot/textlib.py, line
83, the outer brace is greedy. Changing
'template': re.compile(r'(?s){{(({{.*?}})|.)*}}'),
to
'template': re.compile(r'(?s){{(({{.*?}})|.)*?}}'),
solved the problem for me.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158761&group_…
Bugs item #3158761, was opened at 2011-01-15 10:17
Message generated for change (Tracker Item Submitted) made by binbot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158761&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bináris (binbot)
Assigned to: Nobody/Anonymous (nobody)
Summary: Template exception overworks in replace.py
Initial Comment:
I correct spelling mistakes with replace.py, and use exception:
'exceptions': {
'inside-tags': [
'hyperlink',
'template',
],
etc. as shown at http://meta.wikimedia.org/wiki/Pywikipediabot/replace.py/it
This exception excludes a lot of text that should be replaced! After a long investigation I suspect that the problem may exist when the template is complicated, e. g. the article begins with an infobox. The bot probably thinks to be inside of the template when it is already closed.
Examples:
In the last sentence of section http://hu.wikipedia.org/w/index.php?title=Nagyv%C3%A1rad&oldid=9085449#N.C3… the word "telepitettek" was not found. The article begins with an infobox.
In the middle of section http://hu.wikipedia.org/w/index.php?title=Opera_%28sz%C3%ADnm%C5%B1%29&oldi… the word "Szenitávnéji" was not found. The article has no infobox, but the text is preceeded by some templates with parameters, one of them at the very beginning.
In section http://hu.wikipedia.org/w/index.php?title=Tennessee&oldid=9028125#Megy.C3.A… the word "alapitási" was not found. The article begins with an infobox.
But:
The bot made the replacement here: http://hu.wikipedia.org/w/index.php?title=Mozilla&diff=9106942&oldid=8920815
This is also preceeded by some templates, which have parameters, but the one at the beginning of the article has no parameters. Does this make the difference?
All the above mentioned instances were found by the bot when I commented the word "template" out of the exceptions.
Not clear whether the bug is in replace.py or pagegenerators.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158761&group_…
Bugs item #3158598, was opened at 2011-01-15 00:57
Message generated for change (Tracker Item Submitted) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158598&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Merlijn S. van Deen (valhallasw)
Assigned to: Nobody/Anonymous (nobody)
Summary: Dead code in redirect.py
Initial Comment:
sd_tagging_sum is never defined, but is used:
if targetPage.site().lang in sd_template and \
targetPage.site().lang in sd_tagging_sum:
and further. This code probably was used in an older version, but is apparently dead now...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158598&group_…
Bugs item #3158464, was opened at 2011-01-14 22:15
Message generated for change (Comment added) made by valhallasw
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py add crashes on redirect
Initial Comment:
If you run "python category.py add" for a page of links, and one link is a redirect, category.py crashes with:
Traceback (most recent call last):
File "category.py", line 1188, in ?
main()
File "category.py", line 1141, in main
bot.run()
File "category.py", line 410, in run
self.treat(page)
File "category.py", line 480, in treat
text = self.load(page)
File "category.py", line 430, in load
redirTarget = pywikibot.Page(site, arg.args[0])
NameError: global name 'site' is not defined
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8824, 2011/01/14, 06:42:24)
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-14 23:15
Message:
--- category.py 2011-01-14 23:07:25.000000000 +0100
+++ category_new.py 2011-01-14 23:03:27.000000000 +0100
@@ -426,8 +291,8 @@
else:
pywikibot.output(u"Page %s does not exist; skipping."
% page.title(asLink=True))
- except pywikibot.IsRedirectPage:
- redirTarget = pywikibot.Page(site, arg.args[0])
+ except pywikibot.IsRedirectPage, arg:
+ redirTarget = pywikibot.Page(self.site, arg.args[0])
pywikibot.output(u"WARNING: Page %s is a redirect to %s;
skipping."
% (page.title(asLink=True),
redirTarget.title(asLink=True)))
----------------------------------------------------------------------
Comment By: Daniel Barrett (djbarrett)
Date: 2011-01-14 22:52
Message:
The problem is absent prior to -r8493, when (according to the log message)
a "new class for the Add action" was used. In this older version,
redirects are noted and ignored, instead of crashing.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Bugs item #3158464, was opened at 2011-01-14 16:15
Message generated for change (Comment added) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py add crashes on redirect
Initial Comment:
If you run "python category.py add" for a page of links, and one link is a redirect, category.py crashes with:
Traceback (most recent call last):
File "category.py", line 1188, in ?
main()
File "category.py", line 1141, in main
bot.run()
File "category.py", line 410, in run
self.treat(page)
File "category.py", line 480, in treat
text = self.load(page)
File "category.py", line 430, in load
redirTarget = pywikibot.Page(site, arg.args[0])
NameError: global name 'site' is not defined
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8824, 2011/01/14, 06:42:24)
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
>Comment By: Daniel Barrett (djbarrett)
Date: 2011-01-14 16:52
Message:
The problem is absent prior to -r8493, when (according to the log message)
a "new class for the Add action" was used. In this older version,
redirects are noted and ignored, instead of crashing.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Bugs item #3158464, was opened at 2011-01-14 16:15
Message generated for change (Tracker Item Submitted) made by djbarrett
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: category
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Barrett (djbarrett)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py add crashes on redirect
Initial Comment:
If you run "python category.py add" for a page of links, and one link is a redirect, category.py crashes with:
Traceback (most recent call last):
File "category.py", line 1188, in ?
main()
File "category.py", line 1141, in main
bot.run()
File "category.py", line 410, in run
self.treat(page)
File "category.py", line 480, in treat
text = self.load(page)
File "category.py", line 430, in load
redirTarget = pywikibot.Page(site, arg.args[0])
NameError: global name 'site' is not defined
$ python version.py
Pywikipedia [http] trunk/pywikipedia (r8824, 2011/01/14, 06:42:24)
Python 2.4.3 (#1, Nov 11 2010, 13:30:19)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
config-settings:
use_api = True
use_api_login = True
unicode test: ok
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3158464&group_…
Bugs item #3153555, was opened at 2011-01-09 10:33
Message generated for change (Comment added) made by tgr_
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3153555&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tgr (tgr_)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unicode error when handling non-ASCII network errors
Initial Comment:
The error handler for Site.postData in wikipedia.py line 5248 (in r8821) casts an exception to a string:
except Exception, e:
output(u'%s' %e)
This will fail with a UnicodeDecodeError if the exception message contains non-ASCII characters (which is often the case for network error messages on non-English Windows).
Pywikipedia [http] trunk/pywikipedia (r8821, 2011/01/06, 22:01:33)
Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]
config-settings:
use_api = True
use_api_login = True
unicode test: triggers problem #3081100
----------------------------------------------------------------------
Comment By: Tgr (tgr_)
Date: 2011-01-09 14:59
Message:
Hungarian Windows, codepage 852
%r gives
URLError(error(10054, 'A l\xe9tez\xf5 kapcsolatot a t\xe1voli
\xe1llom\xe1s k\xe9nyszer\xedtetten bez\xe1rta'),)
----------------------------------------------------------------------
Comment By: Merlijn S. van Deen (valhallasw)
Date: 2011-01-09 11:33
Message:
Can you reproduce the problem?
If so, please change output(u"%s" % e) to output(u"%r"% e) and add a
comment with the output you get. Additionally, please tell us what code
page you are using (run 'chcp' in a dos box) and the language of your
windows version.
Thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3153555&group_…