Patches item #2762697, was opened at 2009-04-14 20:14
Message generated for change (Tracker Item Submitted) made by drtrigon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=276269…
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: Dr. Trigon (drtrigon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Stability in wikipedia.py
Initial Comment:
Recently I've had some problems with the stability of 'wikipedia.put(...)'
sometimes this method had some issues and that killed my bot.
I was able to track the problem down to 'wikipedia._getEditPage(...)' and
following code (in 'wikipedia.py' around line 725):
********************************
while not textareaFound:
text = self.site().getUrl(path, sysop = sysop)
if text.find("<title>Wiki does not exist</title>") !=
-1:
raise NoSuchSite(u'Wiki %s does not exist yet' % self.site())
********************************
and I have changed it that way, to hold my bot/script running:
********************************
while not textareaFound:
try:
text = self.site().getUrl(path, sysop = sysop)
except:
time.sleep(1)
continue
if text.find("<title>Wiki does not exist</title>") !=
-1:
raise NoSuchSite(u'Wiki %s does not exist yet' % self.site())
********************************
and I am "pretty" sure that this solved my problem. :)
Probably you are also intressted in this solution?! I would assume that the delay of 1sec
is neither critical nor needed.
Greetings
DrTrigon
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=276269…