Bugs item #1932907, was opened at 2008-04-03 06:16
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&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: General
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: sre_constants.error in wikipedia.py called from interwiki.py
Initial Comment:
I got this error when running interwiki.py r5177 in autonomous mode. I use Python 2.5.
======Post-processing [[fi:Yorkshirenterrieri]]======
Updating links on page [[lt:Jorkšyro terjeras]].
Changes to be made: Pridedama: [[ko:??????]]
+ [[ko:??????]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 26.7 seconds, 2008-04-03 06:57:31
Changing page [[lt:Jorkšyro terjeras]]
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 1645, in <module>
bot.run()
File "C:\svn\pywikipedia\interwiki.py", line 1409, in run
self.queryStep()
File "C:\svn\pywikipedia\interwiki.py", line 1388, in queryStep
subj.finish(self)
File "C:\svn\pywikipedia\interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "C:\svn\pywikipedia\interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "C:\svn\pywikipedia\wikipedia.py", line 1210, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "C:\svn\pywikipedia\wikipedia.py", line 1366, in _putPage
).replace("$1", "(?P<length>[\d,. ]+)").replace("$2", "(?P<limit>[\d,. ]+)")
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name u'length' as group 2; was group 1
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 23:52
Message:
Logged In: YES
user_id=1963242
Originator: NO
I still see some problems. If the message only contains $1 or $2 in
{{plural}}, the information is lost.
But actually, is there is a valid reason to spend so much time trying to
figure out what are the values of 'length' and 'limit' ? Does the user need
it ?
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 23:10
Message:
Logged In: YES
user_id=181280
Originator: NO
Well... The sre_constants.error fixed in r5180 and in r5181. The long page
error detection wasn't still working with Lithuanian Wikipedia until it's
improved in r5182.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 17:12
Message:
Logged In: YES
user_id=1963242
Originator: NO
Well, siebrand reported the error from [[sq:]] where the message is
"<strong>GABIM: Tesksti që ju po e redaktoni është $1 kilobytes i gjatë
dhe është më i gjatë se maksimumi i lejuar prej $1 kilobytes.
Ndryshimet nuk mund të ruhen.</strong>"
It might be a localization error, and will be fixed soon, but still, we
need to prevent this on our side too :)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 16:51
Message:
Logged In: YES
user_id=181280
Originator: NO
Yes, thank you. I have seen the problem, soon fixed. Please, let me know
others wiki sites where error occurs.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 16:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
Siebrand reported on IRC the same error in r5179, that's why I asked for
r5180 to be committed.
I really don't see how r5179 could have fixed the bug, cosoleto. The error
explains that the RE group 'length' was being there twice, which means that
$1 was present in the error messages several times.
1) About our bug, aren't replace(" $1", "(?P<length>[\d,. ]+)") and
replace("$1", "(?P<length>[\d,. ]+)") the same ? Spaces are being captured
inside the length group, so replacing "$1" by " $1" is the same for the
debugging part: But actually, I see some problems with this fix because you
assume that every $1 is being preceded by a space, which is wrong. Some
wikis could use {{longpageerror|$1}} for instance, and your r5179 fix would
break the detection.
2) When several $1 are being here, your r5181 fix is also wrong. Sure,
adding the count parameter prevents a RE error, but it will let the second
"$1" unchanged. Meaning that the regex will be "(?P<length>[\d,. ]+)Kb
blablah Too big :$1/(?P<limit>[\d,. ]+)" it won't match the error message
"2000Kb blablah Too big :2000/1500". That's why I changed it to be
"(?P<length>[\d,. ]+)Kb blablah Too big :.*/(?P<limit>[\d,. ]+)"
3) And now that I think of this, we need to re.escape() the message. A
longpage message including regex special chars could be harmful.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-03 14:51
Message:
Logged In: YES
user_id=181280
Originator: NO
For a strange reason lt.wiki use {{plural}} in
[[MediaWiki:longpageerror]], so new long page error detection fail. Fixed
in r5179.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&group_…
Bugs item #1932907, was opened at 2008-04-03 06:16
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&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: General
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: sre_constants.error in wikipedia.py called from interwiki.py
Initial Comment:
I got this error when running interwiki.py r5177 in autonomous mode. I use Python 2.5.
======Post-processing [[fi:Yorkshirenterrieri]]======
Updating links on page [[lt:Jorkšyro terjeras]].
Changes to be made: Pridedama: [[ko:??????]]
+ [[ko:??????]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 26.7 seconds, 2008-04-03 06:57:31
Changing page [[lt:Jorkšyro terjeras]]
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 1645, in <module>
bot.run()
File "C:\svn\pywikipedia\interwiki.py", line 1409, in run
self.queryStep()
File "C:\svn\pywikipedia\interwiki.py", line 1388, in queryStep
subj.finish(self)
File "C:\svn\pywikipedia\interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "C:\svn\pywikipedia\interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "C:\svn\pywikipedia\wikipedia.py", line 1210, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "C:\svn\pywikipedia\wikipedia.py", line 1366, in _putPage
).replace("$1", "(?P<length>[\d,. ]+)").replace("$2", "(?P<limit>[\d,. ]+)")
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name u'length' as group 2; was group 1
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 23:10
Message:
Logged In: YES
user_id=181280
Originator: NO
Well... The sre_constants.error fixed in r5180 and in r5181. The long page
error detection wasn't still working with Lithuanian Wikipedia until it's
improved in r5182.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 17:12
Message:
Logged In: YES
user_id=1963242
Originator: NO
Well, siebrand reported the error from [[sq:]] where the message is
"<strong>GABIM: Tesksti që ju po e redaktoni është $1 kilobytes i gjatë
dhe është më i gjatë se maksimumi i lejuar prej $1 kilobytes.
Ndryshimet nuk mund të ruhen.</strong>"
It might be a localization error, and will be fixed soon, but still, we
need to prevent this on our side too :)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 16:51
Message:
Logged In: YES
user_id=181280
Originator: NO
Yes, thank you. I have seen the problem, soon fixed. Please, let me know
others wiki sites where error occurs.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 16:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
Siebrand reported on IRC the same error in r5179, that's why I asked for
r5180 to be committed.
I really don't see how r5179 could have fixed the bug, cosoleto. The error
explains that the RE group 'length' was being there twice, which means that
$1 was present in the error messages several times.
1) About our bug, aren't replace(" $1", "(?P<length>[\d,. ]+)") and
replace("$1", "(?P<length>[\d,. ]+)") the same ? Spaces are being captured
inside the length group, so replacing "$1" by " $1" is the same for the
debugging part: But actually, I see some problems with this fix because you
assume that every $1 is being preceded by a space, which is wrong. Some
wikis could use {{longpageerror|$1}} for instance, and your r5179 fix would
break the detection.
2) When several $1 are being here, your r5181 fix is also wrong. Sure,
adding the count parameter prevents a RE error, but it will let the second
"$1" unchanged. Meaning that the regex will be "(?P<length>[\d,. ]+)Kb
blablah Too big :$1/(?P<limit>[\d,. ]+)" it won't match the error message
"2000Kb blablah Too big :2000/1500". That's why I changed it to be
"(?P<length>[\d,. ]+)Kb blablah Too big :.*/(?P<limit>[\d,. ]+)"
3) And now that I think of this, we need to re.escape() the message. A
longpage message including regex special chars could be harmful.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-03 14:51
Message:
Logged In: YES
user_id=181280
Originator: NO
For a strange reason lt.wiki use {{plural}} in
[[MediaWiki:longpageerror]], so new long page error detection fail. Fixed
in r5179.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&group_…
Bugs item #1932907, was opened at 2008-04-03 06:16
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&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: General
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: sre_constants.error in wikipedia.py called from interwiki.py
Initial Comment:
I got this error when running interwiki.py r5177 in autonomous mode. I use Python 2.5.
======Post-processing [[fi:Yorkshirenterrieri]]======
Updating links on page [[lt:Jorkšyro terjeras]].
Changes to be made: Pridedama: [[ko:??????]]
+ [[ko:??????]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 26.7 seconds, 2008-04-03 06:57:31
Changing page [[lt:Jorkšyro terjeras]]
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 1645, in <module>
bot.run()
File "C:\svn\pywikipedia\interwiki.py", line 1409, in run
self.queryStep()
File "C:\svn\pywikipedia\interwiki.py", line 1388, in queryStep
subj.finish(self)
File "C:\svn\pywikipedia\interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "C:\svn\pywikipedia\interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "C:\svn\pywikipedia\wikipedia.py", line 1210, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "C:\svn\pywikipedia\wikipedia.py", line 1366, in _putPage
).replace("$1", "(?P<length>[\d,. ]+)").replace("$2", "(?P<limit>[\d,. ]+)")
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name u'length' as group 2; was group 1
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 17:12
Message:
Logged In: YES
user_id=1963242
Originator: NO
Well, siebrand reported the error from [[sq:]] where the message is
"<strong>GABIM: Tesksti që ju po e redaktoni është $1 kilobytes i gjatë
dhe është më i gjatë se maksimumi i lejuar prej $1 kilobytes.
Ndryshimet nuk mund të ruhen.</strong>"
It might be a localization error, and will be fixed soon, but still, we
need to prevent this on our side too :)
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 16:51
Message:
Logged In: YES
user_id=181280
Originator: NO
Yes, thank you. I have seen the problem, soon fixed. Please, let me know
others wiki sites where error occurs.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 16:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
Siebrand reported on IRC the same error in r5179, that's why I asked for
r5180 to be committed.
I really don't see how r5179 could have fixed the bug, cosoleto. The error
explains that the RE group 'length' was being there twice, which means that
$1 was present in the error messages several times.
1) About our bug, aren't replace(" $1", "(?P<length>[\d,. ]+)") and
replace("$1", "(?P<length>[\d,. ]+)") the same ? Spaces are being captured
inside the length group, so replacing "$1" by " $1" is the same for the
debugging part: But actually, I see some problems with this fix because you
assume that every $1 is being preceded by a space, which is wrong. Some
wikis could use {{longpageerror|$1}} for instance, and your r5179 fix would
break the detection.
2) When several $1 are being here, your r5181 fix is also wrong. Sure,
adding the count parameter prevents a RE error, but it will let the second
"$1" unchanged. Meaning that the regex will be "(?P<length>[\d,. ]+)Kb
blablah Too big :$1/(?P<limit>[\d,. ]+)" it won't match the error message
"2000Kb blablah Too big :2000/1500". That's why I changed it to be
"(?P<length>[\d,. ]+)Kb blablah Too big :.*/(?P<limit>[\d,. ]+)"
3) And now that I think of this, we need to re.escape() the message. A
longpage message including regex special chars could be harmful.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-03 14:51
Message:
Logged In: YES
user_id=181280
Originator: NO
For a strange reason lt.wiki use {{plural}} in
[[MediaWiki:longpageerror]], so new long page error detection fail. Fixed
in r5179.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&group_…
Bugs item #1932907, was opened at 2008-04-03 06:16
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&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: General
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: sre_constants.error in wikipedia.py called from interwiki.py
Initial Comment:
I got this error when running interwiki.py r5177 in autonomous mode. I use Python 2.5.
======Post-processing [[fi:Yorkshirenterrieri]]======
Updating links on page [[lt:Jorkšyro terjeras]].
Changes to be made: Pridedama: [[ko:??????]]
+ [[ko:??????]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 26.7 seconds, 2008-04-03 06:57:31
Changing page [[lt:Jorkšyro terjeras]]
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 1645, in <module>
bot.run()
File "C:\svn\pywikipedia\interwiki.py", line 1409, in run
self.queryStep()
File "C:\svn\pywikipedia\interwiki.py", line 1388, in queryStep
subj.finish(self)
File "C:\svn\pywikipedia\interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "C:\svn\pywikipedia\interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "C:\svn\pywikipedia\wikipedia.py", line 1210, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "C:\svn\pywikipedia\wikipedia.py", line 1366, in _putPage
).replace("$1", "(?P<length>[\d,. ]+)").replace("$2", "(?P<limit>[\d,. ]+)")
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name u'length' as group 2; was group 1
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-05 16:51
Message:
Logged In: YES
user_id=181280
Originator: NO
Yes, thank you. I have seen the problem, soon fixed. Please, let me know
others wiki sites where error occurs.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 16:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
Siebrand reported on IRC the same error in r5179, that's why I asked for
r5180 to be committed.
I really don't see how r5179 could have fixed the bug, cosoleto. The error
explains that the RE group 'length' was being there twice, which means that
$1 was present in the error messages several times.
1) About our bug, aren't replace(" $1", "(?P<length>[\d,. ]+)") and
replace("$1", "(?P<length>[\d,. ]+)") the same ? Spaces are being captured
inside the length group, so replacing "$1" by " $1" is the same for the
debugging part: But actually, I see some problems with this fix because you
assume that every $1 is being preceded by a space, which is wrong. Some
wikis could use {{longpageerror|$1}} for instance, and your r5179 fix would
break the detection.
2) When several $1 are being here, your r5181 fix is also wrong. Sure,
adding the count parameter prevents a RE error, but it will let the second
"$1" unchanged. Meaning that the regex will be "(?P<length>[\d,. ]+)Kb
blablah Too big :$1/(?P<limit>[\d,. ]+)" it won't match the error message
"2000Kb blablah Too big :2000/1500". That's why I changed it to be
"(?P<length>[\d,. ]+)Kb blablah Too big :.*/(?P<limit>[\d,. ]+)"
3) And now that I think of this, we need to re.escape() the message. A
longpage message including regex special chars could be harmful.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-03 14:51
Message:
Logged In: YES
user_id=181280
Originator: NO
For a strange reason lt.wiki use {{plural}} in
[[MediaWiki:longpageerror]], so new long page error detection fail. Fixed
in r5179.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&group_…
Bugs item #1932907, was opened at 2008-04-03 06:16
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&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: General
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Mikko Silvonen (silvonen)
Assigned to: Nobody/Anonymous (nobody)
Summary: sre_constants.error in wikipedia.py called from interwiki.py
Initial Comment:
I got this error when running interwiki.py r5177 in autonomous mode. I use Python 2.5.
======Post-processing [[fi:Yorkshirenterrieri]]======
Updating links on page [[lt:Jorkšyro terjeras]].
Changes to be made: Pridedama: [[ko:??????]]
+ [[ko:??????]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 26.7 seconds, 2008-04-03 06:57:31
Changing page [[lt:Jorkšyro terjeras]]
Dump fi (wikipedia) saved
Traceback (most recent call last):
File "C:\svn\pywikipedia\interwiki.py", line 1645, in <module>
bot.run()
File "C:\svn\pywikipedia\interwiki.py", line 1409, in run
self.queryStep()
File "C:\svn\pywikipedia\interwiki.py", line 1388, in queryStep
subj.finish(self)
File "C:\svn\pywikipedia\interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "C:\svn\pywikipedia\interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "C:\svn\pywikipedia\wikipedia.py", line 1210, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "C:\svn\pywikipedia\wikipedia.py", line 1366, in _putPage
).replace("$1", "(?P<length>[\d,. ]+)").replace("$2", "(?P<limit>[\d,. ]+)")
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
sre_constants.error: redefinition of group name u'length' as group 2; was group 1
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-04-05 16:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
Siebrand reported on IRC the same error in r5179, that's why I asked for
r5180 to be committed.
I really don't see how r5179 could have fixed the bug, cosoleto. The error
explains that the RE group 'length' was being there twice, which means that
$1 was present in the error messages several times.
1) About our bug, aren't replace(" $1", "(?P<length>[\d,. ]+)") and
replace("$1", "(?P<length>[\d,. ]+)") the same ? Spaces are being captured
inside the length group, so replacing "$1" by " $1" is the same for the
debugging part: But actually, I see some problems with this fix because you
assume that every $1 is being preceded by a space, which is wrong. Some
wikis could use {{longpageerror|$1}} for instance, and your r5179 fix would
break the detection.
2) When several $1 are being here, your r5181 fix is also wrong. Sure,
adding the count parameter prevents a RE error, but it will let the second
"$1" unchanged. Meaning that the regex will be "(?P<length>[\d,. ]+)Kb
blablah Too big :$1/(?P<limit>[\d,. ]+)" it won't match the error message
"2000Kb blablah Too big :2000/1500". That's why I changed it to be
"(?P<length>[\d,. ]+)Kb blablah Too big :.*/(?P<limit>[\d,. ]+)"
3) And now that I think of this, we need to re.escape() the message. A
longpage message including regex special chars could be harmful.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2008-04-03 14:51
Message:
Logged In: YES
user_id=181280
Originator: NO
For a strange reason lt.wiki use {{plural}} in
[[MediaWiki:longpageerror]], so new long page error detection fail. Fixed
in r5179.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1932907&group_…
Bugs item #1933132, was opened at 2008-04-03 05:13
Message generated for change (Comment added) made by uberfuzzy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1933132&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: General
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Paul Tap (paultap)
Assigned to: Nobody/Anonymous (nobody)
Summary: pagefromfile.py fails with error in wikipedia.py
Initial Comment:
I'm trying to append a bit of text to an existing file (actually wanted to create a new one), but the script pagefromfile.py fails with the following output:
python pagefromfile.py -appendbottom -file:/tmp/Testpage.xml
Checked for running processes. 1 processes currently running, including the current process.
Pywikipediabot (r5177 (wikipedia.py), Apr 02 2008, 14:48:54)
Python 2.5.2 (r252:60911, Mar 12 2008, 13:36:25)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu4)]
>>> Hond <<<
Getting page [[Hond]]
Page Hond already exists, appending on bottom!
Getting information for site PaulIen:en
Password for user Filebot on PaulIen:en:
Logging in to PaulIen:en as Filebot
Should be logged in now
Getting information for site PaulIen:en
Traceback (most recent call last):
File "pagefromfile.py", line 296, in <module>
main()
File "pagefromfile.py", line 292, in main
bot.run()
File "pagefromfile.py", line 124, in run
self.put(title, contents)
File "pagefromfile.py", line 174, in put
page.put(contents, comment = comment, minorEdit = self.minor)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 1174, in put
sysop = self._getActionUser(action = 'edit', restriction = self.editRestriction, sysop = False)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 1098, in _getActionUser
if not self.site().isAllowed(action, sysop):
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 3897, in isAllowed
return right in self._rights[index]
TypeError: argument of type 'NoneType' is not iterable
When running in debug mode, this error does not occur, but the script complains about missing start/end tags (looks like another problem to me though).
I've tested upload.py with an image file and that works fine. Just to isolate the problem and to make sure that the filebot is working somehow.
Additional info (from the version page):
* MediaWiki: 1.11.1
* PHP: 5.2.5 (apache2handler)
* MySQL: 5.0.51a
pywikipedia svn update: Updated to revision 5177.
Regards,
Paul Tap
----------------------------------------------------------------------
Comment By: Uberfuzzy (uberfuzzy)
Date: 2008-04-05 08:39
Message:
Logged In: YES
user_id=1976885
Originator: NO
@misza, not all wikia is like that. Halo is one of the special new
"social" code base, and halo is even worse because it has a very custom
skin.
if you want to bot there, see my family.py patch in #1916496
----------------------------------------------------------------------
Comment By: Misza13 (misza13)
Date: 2008-04-03 12:58
Message:
Logged In: YES
user_id=1686644
Originator: NO
I fact, wikias behave very differently. halo.wikia.com for example uses:
<body onload='' class='ns-0 ltr page-Main_Page'>
and no div id we're used to.
Any ideas how to universally detect a wiki page? I've gotten to like the
modern skin on Wikipedia but can't run my preciousss adminbots with it.
----------------------------------------------------------------------
Comment By: Paul Tap (paultap)
Date: 2008-04-03 11:24
Message:
Logged In: YES
user_id=1897388
Originator: YES
Had to upload some images and found out that the "changes" suggested
below, cause the new errors and also break the upload.py. So the issue is
still open.
----------------------------------------------------------------------
Comment By: Paul Tap (paultap)
Date: 2008-04-03 06:36
Message:
Logged In: YES
user_id=1897388
Originator: YES
I've tested both (erwin85_wp and uberfuzzy) updates and now run into the
following:
python pagefromfile.py -appendbottom -file:/tmp/Testpage.xml
Checked for running processes. 1 processes currently running, including
the current process.
>>> Hond <<<
Traceback (most recent call last):
File "pagefromfile.py", line 296, in <module>
main()
File "pagefromfile.py", line 292, in main
bot.run()
File "pagefromfile.py", line 124, in run
self.put(title, contents)
File "pagefromfile.py", line 146, in put
if page.exists():
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 841, in
exists
self.get()
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 622, in
get
self._contents = self._getEditPage(get_redirect = get_redirect,
throttle = throttle, sysop = sysop, nofollow_redirects=nofollow_redirects)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 671, in
_getEditPage
text = self.site().getUrl(path, sysop = sysop)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 4180, in
getUrl
self._getUserData(text, sysop = sysop)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 4202, in
_getUserData
blocked = self.isBlocked(sysop = sysop)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 3881, in
isBlocked
% self.api_address(), sysop=sysop)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 4169, in
getUrl
self.checkCharset(charset)
File "/home/paul/bin/PaulIen/pywikipedia/wikipedia.py", line 5247, in
checkCharset
% (repr(self), self.charset, charset)
AssertionError: charset for PaulIen:en changed from UTF-8 to iso-8859-1
This now also happens in debug mode. Any ideas on this?
----------------------------------------------------------------------
Comment By: erwin85 (erwin85_wp)
Date: 2008-04-03 06:25
Message:
Logged In: YES
user_id=1907826
Originator: NO
Not all versions use two spaces. I suggest using something like:
if not re.search(r'\<body[ ]*?class\="mediawiki', text):
I can't test it myself right now, so I'm not committing it.
----------------------------------------------------------------------
Comment By: Uberfuzzy (uberfuzzy)
Date: 2008-04-03 06:01
Message:
Logged In: YES
user_id=1976885
Originator: NO
per change in wikipedia.py in #5173, wikipage detection was changed, but
misza missed a space.
on line 4192 (if different, just find "# Not a wiki page")
if '<body class="mediawiki' not in text:
change to
if '<body class="mediawiki' not in text:
note the 2 spaces between body and class, thats it
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1933132&group_…
Patches item #1934877, was opened at 2008-04-05 08:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1934877&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: IWAI Masaharu (iwaim)
Assigned to: Nobody/Anonymous (nobody)
Summary: translate: lang:ja summary for movepages.py
Initial Comment:
I translated to Japanese the summary in the movepages.py.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1934877&group_…