[Pywikipedia-l] [ pywikipediabot-Bugs-1966691 ] no fallback solution when user don't have (c)ElementTree
SourceForge.net
noreply at sourceforge.net
Mon May 19 07:13:48 UTC 2008
Bugs item #1966691, was opened at 2008-05-19 03:22
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1966691&group_id=93107
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: interwiki
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: Melancholie (melancholie)
Assigned to: Nobody/Anonymous (nobody)
>Summary: no fallback solution when user don't have (c)ElementTree
Initial Comment:
rev5401:
Changing page [[fr:Manuel d'histoire commun franco-allemand]]
Dump eo (wikipedia) saved
Traceback (most recent call last):
File "interwiki.py", line 1733, in ?
bot.run()
File "interwiki.py", line 1484, in run
self.queryStep()
File "interwiki.py", line 1463, in queryStep
subj.finish(self)
File "interwiki.py", line 1044, in finish
if self.replaceLinks(page, new, bot):
File "interwiki.py", line 1202, in replaceLinks
status, reason, data = page.put(newtext, comment = wikipedia.translate(page. site().lang, msg)[0] + mods)
File "wikipedia.py", line 1263, in put
newPage, self.site().getToken(sysop = sysop), sysop = sysop)
File "wikipedia.py", line 1363, in _putPage
if self.site().has_mediawiki_message("spamprotectiontitle")\
File "wikipedia.py", line 4472, in has_mediawiki_message
v = self.mediawiki_message(key)
File "wikipedia.py", line 4429, in mediawiki_message
from cElementTree import XML
ImportError: No module named cElementTree
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2008-05-19 09:13
Message:
Logged In: YES
user_id=1963242
Originator: NO
Yes. I had to change the behavior here, due to bug #1966402 "wrong
mediawiki_message when not using the default site lang"
I committed r5402 so it verbose the user about the problem, however, from
now on, you'll need to install the module cElementTree, or its slower
implementation, ElementTree, to have pywikipedia to work.
Renaming the bug to "no fallback solution when user don't have
(c)ElementTree "
(I'm marking this bug as WONT FIX : If some dev is willing here to write a
slower implementation of mediawiki_message using for examples regexes, go
ahead. I consider here that since cElementTree/ElementTree was needed for
XML dump parsing, the current behavior is fine, but that's only *my*
opinion)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1966691&group_id=93107
More information about the Pywikipedia-l
mailing list