[Spambayes] RE: imapfilter.py

Rafael Scholl rafael.scholl at bbox.ch
Mon Sep 8 03:23:31 EDT 2003

>This looks like you have tried to use the 1.0a5 imapfilter.py file with
>the rest of the 1.0a4 release.

Yes, that's precisely what I did.

>If you can get 1.0a5 working, it would be good to see the output from
>running "imapfilter.py -t -c -i4".  This will print out a whole heap of
>information that contains the actual IMAP responses, and might help
>figure out where the problem is occurring.

Ok, I got the 1.0a5 files and ran "setup.py install". (Should I have 
uninstalled the previous package first?)

In the web interface, the folder names still appear garbled with the first 
letter and the last missing for all folders except for Deleted Items and 
Sent Items. Additionally, when I tried to save the training folder this 
error appeared:

500 Server error

Traceback (most recent call last):
   File "C:\PROGRA~1\Python23\lib\site-packages\spambayes\Dibbler.py", line 
453, in found_terminator
     getattr(plugin, name)(**params)
   File "C:\PROGRA~1\Python23\lib\site-packages\spambayes\ImapUI.py", line 
250, in onChangeopts
     UserInterface.UserInterface.onChangeopts(self, **parms)
"C:\PROGRA~1\Python23\lib\site-packages\spambayes\UserInterface.py", line 
665, in onChangeopts
     errmsg = self.verifyInput(parms, pmap)
UnboundLocalError: local variable 'pmap' referenced before assignment

However, it was possible to set the configure the mail server and the user 
name and password. I then edited bayescustomize.ini and included 
"spam_train_folders:Deleted Items" manually. With this done I ran 
"imapfilter.py -t -c -i4" and this was the result:

C:\Program Files\Python23\Scripts>imapfilter.py -t -c -i4
SpamBayes IMAP Filter Alpha2, version 0.02 (September 2003),
using SpamBayes IMAP Filter Web Interface Alpha2, version 0.02
and engine SpamBayes Beta2, version 0.2 (July 2003).

   15:53.90 > BOBC1 LOGIN "name at mailserver.ch" "password"
   15:53.92 < BOBC1 OK LOGIN completed
   15:53.92 > BOBC2 SELECT "Deleted Items"
   15:53.93 < * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
   15:53.93 < * 0 EXISTS
   15:53.93 < * 0 RECENT
   15:53.93 < * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen 
\Draft \*)]

   15:53.95 < * OK [UNSEEN 0]
   15:53.95 < * OK [UIDVALIDITY 433788907] UIDs are valid
   15:53.95 < BOBC2 OK [READ-WRITE] opened Deleted Items
   15:53.96 < BOBC3 OK UID SEARCH completed
Traceback (most recent call last):
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 803, in ?
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 789, in run
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 630, in Train
     num_spam_trained = folder.Train(self.classifier, True)
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 542, in Train
     for msg in self:
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 468, in 
     for key in self.keys():
   File "C:\Program Files\Python23\Scripts\imapfilter.py", line 490, in keys
     return response[1][0].split(' ')
AttributeError: 'NoneType' object has no attribute 'split'

So it seems to me that there's some sort of new problem, but I can't make 
heads or tails of it.

Rafael Scholl 

* Checked for virus by F-Secure Content Scanner 6.10b36 *

More information about the Spambayes mailing list