Re: Bug solution for Spambayes.

[email protected]
Newsgroups gmane.mail.spam.spambayes.devel,gmane.mail.spam.spambayes.general
Message-ID <[email protected]>
    Johann> I have some problems with my sourceforge account, therefore I
    Johann> contact you this way.

Johann,

I am on holiday, just sneaking a peek at my email.  Based on your traceback,
I went ahead and finished off a change suggested recently which should solve
the problem.  I incorporated the Python 2.5 versions of the asynchat and
asyncore modules into SpamBayes as the API of those modules changed in
incompatible ways in Python 2.6.

I made a new source release of SpamBayes, 1.1b1.  Please give that a try.
If you continue to have problems, please send an email to
[email protected]  I won't be checking mail much in the next several
days.

-- 
Skip Montanaro - [email protected] - http://www.smontanaro.net/

    Johann> As you being an active developper of SpamBayes I have some bug 
    Johann> information and the solution to you. I'm trying to run Spambayes with 
    Johann> ubuntu1010 and use python2.6. When trying to train spam by the web 
    Johann> interface I get the following exception:

    Johann> ---------------------------------------------------------------------------------------------
    Johann> Traceback (most recent call last):

    Johann>    File "/usr/lib/python2.6/dist-packages/spambayes/Dibbler.py", line 
    Johann> 470, in found_terminator
    Johann>      getattr(plugin, name)(**params)

    Johann>    File "/usr/lib/python2.6/dist-packages/spambayes/ProxyUI.py", line 
    Johann> 399, in onReview
    Johann>      self.flush()

    Johann>    File "/usr/lib/python2.6/dist-packages/spambayes/Dibbler.py", line 
    Johann> 706, in flush
    Johann>      return self._handler.flush()

    Johann>    File "/usr/lib/python2.6/dist-packages/spambayes/Dibbler.py", line 
    Johann> 221, in flush
    Johann>      while (self.producer_fifo or self.ac_out_buffer) and not self._closed:

    Johann>    File "/usr/lib/python2.6/asyncore.py", line 406, in __getattr__
    Johann>      %(self.__class__.__name__, attr))

    Johann> AttributeError: _HTTPHandler instance has no attribute 'ac_out_buffer'
    Johann> ---------------------------------------------------------------------------------------------


    Johann> After some reading in the internet I found that the problem was python2.6:
    Johann> http://mail.python.org/pipermail/spambayes/2011-January/022943.html

    Johann> This Thread shows the solution.
    Johann> http://mail.python.org/pipermail/spambayes/2009-June/022430.html


    Johann> After I have replaced
    Johann>    while (self.producer_fifo or self.ac_out_buffer) and not self._closed
    Johann> with
    Johann>    while self.writable() and not self._closed
    Johann> Spambayes works fine again for me. I can confirm this solution solves my 
    Johann> problems.

    Johann> I would strongly recomend to do include this changes to the source archive.

    Johann> Thank you very much for developping this great spam filter.

    Johann> Regards,
    Johann> Johann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.