<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi!<br>
<br>
I have not yet tried your suggestions. However, I noticed that whenever
I Review messages and click on Train the training completes and is
saved. However, it will produce the error repeatedly. It appears that
the error is not dependent on a particular message in the cache since
all previous messages in the cache have already been cleared. When the
cache is empty, the error appears on clicking Review message. Does this
behaviour provide any new clues for you?<br>
<br>
I have not had this problem before and I have been using Spambayes for
a very long time. So far I have trained on 14000 Spams and 12000 Hams.
So I feel it is not related to python or the email package.<br>
<br>
Regards.<br>
<br>
Stephen Ng<br>
<br>
Tony Meyer wrote:<br>
<blockquote type="cite"
 cite="midECBA357DDED63B4995F5C1F5CBE5B1E801DAFEF7@its-xchg4.massey.ac.nz">
  <blockquote type="cite">
    <pre wrap="">I received the following error after Reviewing and clicking
on Train -


Training... Saving... Done. Trained on 10 messages. 
 
500 Server error
Traceback (most recent call last):

    </pre>
  </blockquote>
  <pre wrap=""><!---->[...]
  </pre>
  <blockquote type="cite">
    <pre wrap=""> File "/usr/lib/python2.2/email/Header.py", line 67, in decode_header
    if not ecre.search(header):

RuntimeError: maximum recursion limit exceeded
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This looks the same as this bug:

[ 802530 ] Unable to review messages this morning
<a class="moz-txt-link-rfc2396E" href="http://sourceforge.net/tracker/?group_id=61702&atid=498103&func=detail&aid=802530">&lt;http://sourceforge.net/tracker/?group_id=61702&amp;atid=498103&amp;func=detail&amp;aid=
802530&gt;</a>

Which I closed because we hadn't heard back from the OP in a long time (i.e.
it wasn't ever resolved).

What operating system is this?  sb_server increases the stack size (I
presume that's the limit that's being hit, although I could be wrong) on Mac
OS X, which I think was to avoid something like this.

Do you have Python 2.3 or 2.4 available to you?  If you do, do you get the
same problem when using them?  This could be something that has been fixed
in the email package (or in the re module).

Finally, I suspect that it's one individual message that is causing the
problem here.  If you could identify which one, and give us a copy of it,
that would help a lot.  There are two ways I can think of to do that.  One
is to put a "print message.id" before the "messageInfo.bodySummary =
self._trimHeader(text, 200)" line in ProxyUI (the last id printed is the
problem one).  The other is to move messages out of the cache until it
works.  (Much more work, but doesn't involve touching the code).

=Tony.Meyer

  </pre>
</blockquote>
</body>
</html>