Bugs item #2762697, was opened at 2009-04-14 20:14
Message generated for change (Comment added) made by drtrigon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2762697&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: 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
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-18 16:42
Message:
@cosoleto: as I mentioned before, is this error very rare and in my bot
that should be running continuously - so it is like gambling, if you try to
reproduce it. so I dicided to provide at least that minimal backtrace, for
you in order to help you. For me this is no problem anymore, since I was
able to "brute-force-patch" it... :) that is also the reason why I posted
it in patches instead of bugs.
@nicdumz: I think you are right! That is good to know and what I
claimed... I looked at the bug you mentioned and it's solution, it should
be the solution to my "problem" also! Even if, with this solution the code
delays 1 min. on first error occurence, my patch delayed only 1 sec. what
was long enough, since it is none of this connection timeout errors... it
is a somehow strange error, something related with socket and looks to me
like a alternating error, but have no idea on how this one is triggered...
@all: ...anyway... thank you all for your info and help! greetings!
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 11:47
Message:
moving to "bugs", instead of patch.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 11:11
Message:
I think that's a bug I recently fixed :
https://sourceforge.net/tracker/index.php?func=detail&aid=2114223&group_id=…
Please comment again if you run into the bug again
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-04-18 00:29
Message:
Please, next time you report a crash, include full traceback. The message
error you have reported helps, but uncut backtraces permit to recognize and
fix the problem more quickly.
The problem should be in Page.geturl(). A new patch is welcome.
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-16 20:46
Message:
here is the error:
(<class 'socket.error'>, error(104, 'Connection reset by peer'),
<traceback object at 0x3595248>)
hope this helps you...?!
greetings
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:21
Message:
...I could add some code to print the exception the next time, my bot is
down...?!
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:19
Message:
Hello back!
I have to apologize because I don't have the error message anymore (I had
it once...) and the error is a bit hard to reproduce, since it is not
thrown very often... :(
You are right; my solution is a kind of "brute-force"... :) Yesterday,
after my first postings, I had a look into 'getUrl', since I was
remembering that it should catch (and did this in the past accordingly)
such kind of problems. What was strange; the error I had occurred
instantaneously after calling 'getUrl', without any time delay... And it
was (most of the time) on the toolserver, which might have another kind of
internet connection and therefore another failure behaviour (and throw
other exceptions)...?!
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-14 20:17
Message:
Hello !
Are you able to elaborate on what error was raised? There is probably a
nicer way to catch the error, at a lower level, instead of bluntly retrying
on error =)
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-14 20:15
Message:
Sorry was NOT 'wikipedia.put(...)' was 'wikipedia.get(...)' !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2762697&group_…
Bugs item #2762697, was opened at 2009-04-14 20:14
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2762697&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: 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
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 11:47
Message:
moving to "bugs", instead of patch.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 11:11
Message:
I think that's a bug I recently fixed :
https://sourceforge.net/tracker/index.php?func=detail&aid=2114223&group_id=…
Please comment again if you run into the bug again
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-04-18 00:29
Message:
Please, next time you report a crash, include full traceback. The message
error you have reported helps, but uncut backtraces permit to recognize and
fix the problem more quickly.
The problem should be in Page.geturl(). A new patch is welcome.
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-16 20:46
Message:
here is the error:
(<class 'socket.error'>, error(104, 'Connection reset by peer'),
<traceback object at 0x3595248>)
hope this helps you...?!
greetings
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:21
Message:
...I could add some code to print the exception the next time, my bot is
down...?!
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:19
Message:
Hello back!
I have to apologize because I don't have the error message anymore (I had
it once...) and the error is a bit hard to reproduce, since it is not
thrown very often... :(
You are right; my solution is a kind of "brute-force"... :) Yesterday,
after my first postings, I had a look into 'getUrl', since I was
remembering that it should catch (and did this in the past accordingly)
such kind of problems. What was strange; the error I had occurred
instantaneously after calling 'getUrl', without any time delay... And it
was (most of the time) on the toolserver, which might have another kind of
internet connection and therefore another failure behaviour (and throw
other exceptions)...?!
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-14 20:17
Message:
Hello !
Are you able to elaborate on what error was raised? There is probably a
nicer way to catch the error, at a lower level, instead of bluntly retrying
on error =)
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-14 20:15
Message:
Sorry was NOT 'wikipedia.put(...)' was 'wikipedia.get(...)' !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2762697&group_…
Patches item #2762697, was opened at 2009-04-14 20:14
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2762697&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: 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
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 11:11
Message:
I think that's a bug I recently fixed :
https://sourceforge.net/tracker/index.php?func=detail&aid=2114223&group_id=…
Please comment again if you run into the bug again
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-04-18 00:29
Message:
Please, next time you report a crash, include full traceback. The message
error you have reported helps, but uncut backtraces permit to recognize and
fix the problem more quickly.
The problem should be in Page.geturl(). A new patch is welcome.
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-16 20:46
Message:
here is the error:
(<class 'socket.error'>, error(104, 'Connection reset by peer'),
<traceback object at 0x3595248>)
hope this helps you...?!
greetings
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:21
Message:
...I could add some code to print the exception the next time, my bot is
down...?!
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-15 11:19
Message:
Hello back!
I have to apologize because I don't have the error message anymore (I had
it once...) and the error is a bit hard to reproduce, since it is not
thrown very often... :(
You are right; my solution is a kind of "brute-force"... :) Yesterday,
after my first postings, I had a look into 'getUrl', since I was
remembering that it should catch (and did this in the past accordingly)
such kind of problems. What was strange; the error I had occurred
instantaneously after calling 'getUrl', without any time delay... And it
was (most of the time) on the toolserver, which might have another kind of
internet connection and therefore another failure behaviour (and throw
other exceptions)...?!
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-14 20:17
Message:
Hello !
Are you able to elaborate on what error was raised? There is probably a
nicer way to catch the error, at a lower level, instead of bluntly retrying
on error =)
----------------------------------------------------------------------
Comment By: Dr. Trigon (drtrigon)
Date: 2009-04-14 20:15
Message:
Sorry was NOT 'wikipedia.put(...)' was 'wikipedia.get(...)' !
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2762697&group_…
Bugs item #2772021, was opened at 2009-04-18 07:53
Message generated for change (Comment added) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2772021&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: Deleted
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: NicDumZ — Nicolas Dumazet (nicdumz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix sourceforge tracker mailing options
Initial Comment:
Testing, if sourceforge tracker has the permissions to send to pywikipedia-bugs.
----------------------------------------------------------------------
>Comment By: NicDumZ — Nicolas Dumazet (nicdumz)
Date: 2009-04-18 08:59
Message:
works. deleting.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2772021&group_…
Bugs item #2772021, was opened at 2009-04-18 07:53
Message generated for change (Tracker Item Submitted) made by nicdumz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2772021&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: NicDumZ — Nicolas Dumazet (nicdumz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix sourceforge tracker mailing options
Initial Comment:
Testing, if sourceforge tracker has the permissions to send to pywikipedia-bugs.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2772021&group_…