Bugs item #1900272, was opened at 2008-02-23 14:34
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1900272&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: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: Login Captcha in FreeBSD (login.py)
Initial Comment:
When I login cawiki's account in remote server (FreeBSD), it cannot return the captcha url and stop by these error:
Opening CAPTCHA in your web browser...
Traceback (most recent call last):
File "login.py", line 277, in ?
main()
File "login.py", line 273, in main
loginMan.login()
File "login.py", line 219, in login
cookiedata = self.getCookie()
File "login.py", line 163, in getCookie
answer = wikipedia.ui.askForCaptcha(url)
File "/usr/home/alexsh/mwbot/pywikipedia/userinterfaces/terminal_interface.py", line 292, in askForCaptcha
except WindowsError:
NameError: global name 'WindowsError' is not defined
----------------------------------------------------------------------
>Comment By: Rotem Liss (rotemliss)
Date: 2008-02-23 17:06
Message:
Logged In: YES
user_id=1327030
Originator: NO
What happens if you comment out the two last lines:
except WindowsError:
return wikipedia.input(u'What is the solution of the CAPTCHA
at %s ?' % url)
in the file "userinterfaces/terminal_interface.py", and try again?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1900272&group_…
Bugs item #1900272, was opened at 2008-02-23 20:34
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1900272&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: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: Login Captcha in FreeBSD (login.py)
Initial Comment:
When I login cawiki's account in remote server (FreeBSD), it cannot return the captcha url and stop by these error:
Opening CAPTCHA in your web browser...
Traceback (most recent call last):
File "login.py", line 277, in ?
main()
File "login.py", line 273, in main
loginMan.login()
File "login.py", line 219, in login
cookiedata = self.getCookie()
File "login.py", line 163, in getCookie
answer = wikipedia.ui.askForCaptcha(url)
File "/usr/home/alexsh/mwbot/pywikipedia/userinterfaces/terminal_interface.py", line 292, in askForCaptcha
except WindowsError:
NameError: global name 'WindowsError' is not defined
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1900272&group_…
Feature Requests item #1899827, was opened at 2008-02-22 18:45
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1899827&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
Priority: 5
Private: No
Submitted By: André Malafaya Baptista (malafaya)
Assigned to: Nobody/Anonymous (nobody)
Summary: No addition of Klingon (tlh) interwiki links
Initial Comment:
Recently there has been quite a fuss because of addition of tlh interwikis to Wiktionaries due to a bug (https://bugzilla.wikimedia.org/show_bug.cgi?id=9164) in Wikimedia sites.
AFAIK, there is no good workaround for this (http://meta.wikimedia.org/wiki/User_talk:Spacebirdy#Tlh_wiki).
I think it would be in order to prevent the addition of these interwiki links (at least for the time being) to pages.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1899827&group_…
Bugs item #1899414, was opened at 2008-02-22 03:42
Message generated for change (Comment added) made by russblau
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: two attribute error in FreeBSD (wikipedia.py)
Initial Comment:
>python interwiki.py -lang:zh -autonomous -continue
......
Updating links on page [[pms:Ucrain-a]].
WARNING: [[cu:OuÇÓÇÙÇÈÇÑÇÖÇÈ]] is either deleted or has a mismatching disambiguation state.
Changes to be made: a modifica: [[gv:Yn Ookraan]]
- [[gv:Yn Ookraane]]
+ [[gv:Yn Ookraan]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 4.4 seconds, 2008-02-22 01:50:31
Changing page [[pms:Ucrain-a]]
Dump zh (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1645, in ?
bot.run()
File "interwiki.py", line 1409, in run
self.queryStep()
File "interwiki.py", line 1388, in queryStep
subj.finish(self)
File "interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1215, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1307, in _putPage
if self.site().has_mediawiki_message("spamprotectiontitle")\
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4302, in has_mediawiki_message
v = self.mediawiki_message(key)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4258, in mediawiki_message
value = tree.textarea.string.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
>python redirect.py double -always -lang:en
....When the code start to detect target, it return back this error.
Traceback (most recent call last):
File "redirect.py", line 399, in ?
main()
File "redirect.py", line 395, in main
bot.run()
File "redirect.py", line 350, in run
self.fix_double_redirects()
File "redirect.py", line 271, in fix_double_redirects
targetPage = newRedir.getRedirectTarget()
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1663, in getRedirectTarget
target = ex.message
AttributeError: IsRedirectPage instance has no attribute 'message'
----------------------------------------------------------------------
>Comment By: Russell Blau (russblau)
Date: 2008-02-22 12:49
Message:
Logged In: YES
user_id=855050
Originator: NO
My apologies; this was indeed a change from Python 2.4 to 2.5, but was not
identified as such in the Python Library Reference. Now fixed.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 10:17
Message:
Logged In: YES
user_id=1963242
Originator: NO
message attribute was introduced in python 2.5
err.args[0] should be used instead of err.message . (err[0] is working but
is in fact deprecated)
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 09:51
Message:
Logged In: YES
user_id=1963242
Originator: NO
I think that this was an issue of Python :
From
http://mail.python.org/pipermail/python-list/2007-January/424576.html, I
got that example :
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... raise Exception, 'this is the error message'
... except Exception, err:
... print "result: ",err.message
...
result:
Traceback (most recent call last):
File "<stdin>", line 4, in ?
AttributeError: Exception instance has no attribute 'message'
>>>
Can anyone reproduce this ?
Since calling to err[0] is a simple workaround to avoid the err.message
error, don't you think that converting all our exception.message to
exception[0] would be a good idea ? (I remember seeing similar err.message
bug reports, but I can't find them...)
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-02-22 08:41
Message:
Logged In: YES
user_id=855050
Originator: NO
The first error is a duplicate of bug 1898827; the second one cannot be
duplicated--
>>> import wikipedia
Checked for running processes. 1 processes currently running, including
the current process.
>>> p = wikipedia.Page(wikipedia.getSite(), "Napoleon") # on en:wiki
>>> p.getRedirectTarget()
Page{[[Napoleon I of France]]}
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 08:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
right, he commited while I posted that :)
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-22 08:29
Message:
Logged In: YES
user_id=1327030
Originator: NO
The first problem was bug 1898827, which was fixed by russblau.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 08:20
Message:
Logged In: YES
user_id=1963242
Originator: NO
I believe that this would be a proper fix :
Index: wikipedia.py
===================================================================
--- wikipedia.py (révision 5068)
+++ wikipedia.py (copie de travail)
@@ -1660,7 +1665,7 @@
except NoPage:
raise
except IsRedirectPage, ex:
- target = ex.message
+ target = ex[0]
if '|' in target:
warnings.warn("'%s' has a | character, this makes no
sense"
% target, Warning)
@@ -4258,9 +4264,9 @@
tree = BeautifulSoup(mwpage,
convertEntities=BeautifulSoup.HTML_ENTITIES,
parseOnlyThese=SoupStrainer("textarea"))
- if tree.textarea is not None:
+ try:
value = tree.textarea.string.strip()
- else:
+ except AttributeError:
value = None
if value:
self._mediawiki_messages[key.lower()] = value
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&group_…
Revision: 5072
Author: filnik
Date: 2008-02-22 17:40:24 +0000 (Fri, 22 Feb 2008)
Log Message:
-----------
Seems that devs have changed the structure of the urls in the special page, fixing the regex according to the changes
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2008-02-22 17:29:15 UTC (rev 5071)
+++ trunk/pywikipedia/welcome.py 2008-02-22 17:40:24 UTC (rev 5072)
@@ -383,7 +383,7 @@
# and i put them in a list (i find it more easy and secure).
while 1:
# FIXME: That's the regex, if there are problems, take a look here.
- reg = r'\(<a href=\"/w/index.php\?title=%s(.*?)&(amp;|)action=edit\"' % talk
+ reg = r'\(<a href=\"/w/index.php\?title=%s(?P<user>.*?)&(?:amp;|)action=(?:edit|editredlink)\"' % talk
p = re.compile(reg, re.UNICODE)
x = p.search(raw, pos)
if x == None:
@@ -394,17 +394,16 @@
wikipedia.output(u'There is nobody to be welcomed...')
break
pos = x.end()
- username = x.group(1)
+ username = x.group('user')
if username not in done:
done.append(username)
userpage = wikipedia.Page(wsite, username)
- usertalkpage = wikipedia.Page(wsite, str(talk) + str(username))
# Defing the contrib's page of the user.
pathWiki = wsite.family.nicepath(wsite.lang)
con = '%sSpecial:Contributions/%s' % (pathWiki, userpage.urlname())
# Getting the contribs...
contribs = wsite.getUrl(con)
- contribnum = contribs.count('<li>') # Maxes at 50, but not important.
+ contribnum = contribs.count('<li>') # It counts the first 50 edits but it shouldn't be a problem.
if contribnum >= number:
wikipedia.output(u'%s has enough edits to be welcomed' % userpage.titleWithoutNamespace() )
# The user must be welcomed, return his data.
Bugs item #1899422, was opened at 2008-02-22 10:54
Message generated for change (Comment added) made by rotemliss
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899422&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: Closed
>Resolution: Later
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: tlh to be removed from wiktionaries
Initial Comment:
Interwiki links to 'tlh' don't work any longer in wiktionaries. Klingon wiktionary seems to be closed. Interwiki links should be removed.
----------------------------------------------------------------------
>Comment By: Rotem Liss (rotemliss)
Date: 2008-02-22 17:34
Message:
Logged In: YES
user_id=1327030
Originator: NO
wiktionary:tlh is not closed yet.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899422&group_…
Bugs item #1899414, was opened at 2008-02-22 09:42
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&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: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: two attribute error in FreeBSD (wikipedia.py)
Initial Comment:
>python interwiki.py -lang:zh -autonomous -continue
......
Updating links on page [[pms:Ucrain-a]].
WARNING: [[cu:OuÇÓÇÙÇÈÇÑÇÖÇÈ]] is either deleted or has a mismatching disambiguation state.
Changes to be made: a modifica: [[gv:Yn Ookraan]]
- [[gv:Yn Ookraane]]
+ [[gv:Yn Ookraan]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 4.4 seconds, 2008-02-22 01:50:31
Changing page [[pms:Ucrain-a]]
Dump zh (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1645, in ?
bot.run()
File "interwiki.py", line 1409, in run
self.queryStep()
File "interwiki.py", line 1388, in queryStep
subj.finish(self)
File "interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1215, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1307, in _putPage
if self.site().has_mediawiki_message("spamprotectiontitle")\
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4302, in has_mediawiki_message
v = self.mediawiki_message(key)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4258, in mediawiki_message
value = tree.textarea.string.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
>python redirect.py double -always -lang:en
....When the code start to detect target, it return back this error.
Traceback (most recent call last):
File "redirect.py", line 399, in ?
main()
File "redirect.py", line 395, in main
bot.run()
File "redirect.py", line 350, in run
self.fix_double_redirects()
File "redirect.py", line 271, in fix_double_redirects
targetPage = newRedir.getRedirectTarget()
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1663, in getRedirectTarget
target = ex.message
AttributeError: IsRedirectPage instance has no attribute 'message'
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 16:17
Message:
Logged In: YES
user_id=1963242
Originator: NO
message attribute was introduced in python 2.5
err.args[0] should be used instead of err.message . (err[0] is working but
is in fact deprecated)
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 15:51
Message:
Logged In: YES
user_id=1963242
Originator: NO
I think that this was an issue of Python :
From
http://mail.python.org/pipermail/python-list/2007-January/424576.html, I
got that example :
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... raise Exception, 'this is the error message'
... except Exception, err:
... print "result: ",err.message
...
result:
Traceback (most recent call last):
File "<stdin>", line 4, in ?
AttributeError: Exception instance has no attribute 'message'
>>>
Can anyone reproduce this ?
Since calling to err[0] is a simple workaround to avoid the err.message
error, don't you think that converting all our exception.message to
exception[0] would be a good idea ? (I remember seeing similar err.message
bug reports, but I can't find them...)
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-02-22 14:41
Message:
Logged In: YES
user_id=855050
Originator: NO
The first error is a duplicate of bug 1898827; the second one cannot be
duplicated--
>>> import wikipedia
Checked for running processes. 1 processes currently running, including
the current process.
>>> p = wikipedia.Page(wikipedia.getSite(), "Napoleon") # on en:wiki
>>> p.getRedirectTarget()
Page{[[Napoleon I of France]]}
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 14:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
right, he commited while I posted that :)
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-22 14:29
Message:
Logged In: YES
user_id=1327030
Originator: NO
The first problem was bug 1898827, which was fixed by russblau.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 14:20
Message:
Logged In: YES
user_id=1963242
Originator: NO
I believe that this would be a proper fix :
Index: wikipedia.py
===================================================================
--- wikipedia.py (révision 5068)
+++ wikipedia.py (copie de travail)
@@ -1660,7 +1665,7 @@
except NoPage:
raise
except IsRedirectPage, ex:
- target = ex.message
+ target = ex[0]
if '|' in target:
warnings.warn("'%s' has a | character, this makes no
sense"
% target, Warning)
@@ -4258,9 +4264,9 @@
tree = BeautifulSoup(mwpage,
convertEntities=BeautifulSoup.HTML_ENTITIES,
parseOnlyThese=SoupStrainer("textarea"))
- if tree.textarea is not None:
+ try:
value = tree.textarea.string.strip()
- else:
+ except AttributeError:
value = None
if value:
self._mediawiki_messages[key.lower()] = value
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&group_…
Bugs item #1899414, was opened at 2008-02-22 09:42
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&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: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Alex S.H. Lin (lin4h)
Assigned to: Nobody/Anonymous (nobody)
Summary: two attribute error in FreeBSD (wikipedia.py)
Initial Comment:
>python interwiki.py -lang:zh -autonomous -continue
......
Updating links on page [[pms:Ucrain-a]].
WARNING: [[cu:OuÇÓÇÙÇÈÇÑÇÖÇÈ]] is either deleted or has a mismatching disambiguation state.
Changes to be made: a modifica: [[gv:Yn Ookraan]]
- [[gv:Yn Ookraane]]
+ [[gv:Yn Ookraan]]
NOTE: Performing a recursive query first to save time....
NOTE: Nothing left to do 2
NOTE: Updating live wiki...
Sleeping for 4.4 seconds, 2008-02-22 01:50:31
Changing page [[pms:Ucrain-a]]
Dump zh (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1645, in ?
bot.run()
File "interwiki.py", line 1409, in run
self.queryStep()
File "interwiki.py", line 1388, in queryStep
subj.finish(self)
File "interwiki.py", line 976, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1127, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page.site().lang, msg)[0] + mods)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1215, in put
return self._putPage(newtext, comment, watchArticle, minorEdit, newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1307, in _putPage
if self.site().has_mediawiki_message("spamprotectiontitle")\
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4302, in has_mediawiki_message
v = self.mediawiki_message(key)
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 4258, in mediawiki_message
value = tree.textarea.string.strip()
AttributeError: 'NoneType' object has no attribute 'strip'
>python redirect.py double -always -lang:en
....When the code start to detect target, it return back this error.
Traceback (most recent call last):
File "redirect.py", line 399, in ?
main()
File "redirect.py", line 395, in main
bot.run()
File "redirect.py", line 350, in run
self.fix_double_redirects()
File "redirect.py", line 271, in fix_double_redirects
targetPage = newRedir.getRedirectTarget()
File "/usr/home/alexsh/mwbot/pywikipedia/wikipedia.py", line 1663, in getRedirectTarget
target = ex.message
AttributeError: IsRedirectPage instance has no attribute 'message'
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 15:51
Message:
Logged In: YES
user_id=1963242
Originator: NO
I think that this was an issue of Python :
From
http://mail.python.org/pipermail/python-list/2007-January/424576.html, I
got that example :
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... raise Exception, 'this is the error message'
... except Exception, err:
... print "result: ",err.message
...
result:
Traceback (most recent call last):
File "<stdin>", line 4, in ?
AttributeError: Exception instance has no attribute 'message'
>>>
Can anyone reproduce this ?
Since calling to err[0] is a simple workaround to avoid the err.message
error, don't you think that converting all our exception.message to
exception[0] would be a good idea ? (I remember seeing similar err.message
bug reports, but I can't find them...)
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2008-02-22 14:41
Message:
Logged In: YES
user_id=855050
Originator: NO
The first error is a duplicate of bug 1898827; the second one cannot be
duplicated--
>>> import wikipedia
Checked for running processes. 1 processes currently running, including
the current process.
>>> p = wikipedia.Page(wikipedia.getSite(), "Napoleon") # on en:wiki
>>> p.getRedirectTarget()
Page{[[Napoleon I of France]]}
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 14:34
Message:
Logged In: YES
user_id=1963242
Originator: NO
right, he commited while I posted that :)
----------------------------------------------------------------------
Comment By: Rotem Liss (rotemliss)
Date: 2008-02-22 14:29
Message:
Logged In: YES
user_id=1327030
Originator: NO
The first problem was bug 1898827, which was fixed by russblau.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-02-22 14:20
Message:
Logged In: YES
user_id=1963242
Originator: NO
I believe that this would be a proper fix :
Index: wikipedia.py
===================================================================
--- wikipedia.py (révision 5068)
+++ wikipedia.py (copie de travail)
@@ -1660,7 +1665,7 @@
except NoPage:
raise
except IsRedirectPage, ex:
- target = ex.message
+ target = ex[0]
if '|' in target:
warnings.warn("'%s' has a | character, this makes no
sense"
% target, Warning)
@@ -4258,9 +4264,9 @@
tree = BeautifulSoup(mwpage,
convertEntities=BeautifulSoup.HTML_ENTITIES,
parseOnlyThese=SoupStrainer("textarea"))
- if tree.textarea is not None:
+ try:
value = tree.textarea.string.strip()
- else:
+ except AttributeError:
value = None
if value:
self._mediawiki_messages[key.lower()] = value
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1899414&group_…