[spambayes-dev] pop3proxy error

Skip Montanaro skip at pobox.com
Wed Sep 24 12:11:07 EDT 2003


I helped a user here set up the POP3 proxy as a Windows service today.  The
environment is Python 2.3, the latest Win32all (1.57?), and the 1.0a6 source
distribution.

Things seem to be going fairly well, however we encountered two tracebacks.
I'm not all that familiar with using it in that environment, so am at a loss
to understand what they mean.  The first error occurred when poking the
Train button the first time:

    Spambayes Web Interface: Home > Review
    Training... Trained on 20 messages. Saving...
    500 Server error
    Traceback (most recent call last):

       File "C:\Program Files\spambayes-1.0a6\spambayes\Dibbler.py", line 453, in found_terminator
         getattr(plugin, name)(**params)

       File "C:\Program Files\spambayes-1.0a6\spambayes\ProxyUI.py", line 324, in onReview
         self._doSave()

       File "C:\Program Files\spambayes-1.0a6\spambayes\UserInterface.py", line 470, in _doSave
         classifier.store()

       File "C:\Program Files\spambayes-1.0a6\spambayes\storage.py", line 229, in store
         self._write_state_key()

       File "C:\Program Files\spambayes-1.0a6\spambayes\storage.py", line 233, in _write_state_key
         self.db[self.statekey] = (classifier.PICKLE_VERSION,

       File "c:\python23\lib\shelve.py", line 130, in __setitem__
         self.dict[key] = f.getvalue()

    TypeError: object does not support item assignment

The second error occurred when poking the "Show Clues" link for a message
after twiddling the advanced config to include the evidence header.

    Spambayes Web Interface: Home > Review > Message clues
    500 Server error
    Traceback (most recent call last):

       File "C:\Program Files\spambayes-1.0a6\spambayes\Dibbler.py", line 453, in found_terminator
         getattr(plugin, name)(**params)

       File "C:\Program Files\spambayes-1.0a6\spambayes\ProxyUI.py", line 462, in onShowclues
         results = self._buildCluesTable(message, subject)

       File "C:\Program Files\spambayes-1.0a6\spambayes\UserInterface.py", line 269, in _buildCluesTable
         evidence=True)

       File "C:\Program Files\spambayes-1.0a6\spambayes\classifier.py", line 158, in chi2_spamprob
         clues = self._getclues(wordstream)

       File "C:\Program Files\spambayes-1.0a6\spambayes\classifier.py", line 391, in _getclues
         record = self._wordinfoget(word)

       File "C:\Program Files\spambayes-1.0a6\spambayes\storage.py", line 250, in _wordinfoget
         r = self.db.get(word)

       File "c:\python23\lib\shelve.py", line 110, in get
         if self.dict.has_key(key):

    AttributeError: 'int' object has no attribute 'has_key'

Skip



More information about the spambayes-dev mailing list