[Spambayes] python 2.3

David Lebel lebel at lebel.org
Wed Jan 7 09:22:20 EST 2004


Quoting Tony Meyer (tameyer at ihug.co.nz):
> Did this happen after a cvs-up, or just at some random point?  There have
> been various changes in the way the database gets opened over the last
> month, but AFAICT they would all hit you the first time you tried to use it
> after a cvs-up (and if sf is working for you again, should all be fixed
> now).

I did a cvs update yesterday and ran up with the same problem.  I could
mail you my hammiedb file, if that could help.

> Are you able to use your database file with any of the other scripts?  (It
> looks like it's not opening it properly, for some reason).

I must confess I didn't try any other scripts.  I mostly only use
sb_filter.py.  I just did a run with sb_mboxtrain.py, and here is the
result:

$ python2.3 /usr/local/bin/sb_mboxtrain.py -n -d ~/.hammiedb -s ~/mail/junk/spam
Training spam (/home/lebel/mail/junk/spam):
  Reading /home/lebel/mail/junk/spam/cur as Maildir
  Trained 0 out of 1313 messages
  Reading /home/lebel/mail/junk/spam/new as Maildir
Traceback (most recent call last):
  File "/usr/local/bin/sb_mboxtrain.py", line 345, in ?  main()
  File "/usr/local/bin/sb_mboxtrain.py", line 336, in main train(h, s, True, force, trainnew, removetrained)
  File "/usr/local/bin/sb_mboxtrain.py", line 264, in train removetrained)
  File "/usr/local/bin/sb_mboxtrain.py", line 137, in maildir_train if not msg_train(h, msg, is_spam, force):
  File "/usr/local/bin/sb_mboxtrain.py", line 102, in msg_train h.train(msg, is_spam)
  File "/usr/local/lib/python2.3/site-packages/spambayes/hammie.py", line 160, in train self.bayes.learn(tokenize(msg), is_spam)
AttributeError: 'NoneType' object has no attribute 'learn'.

That's what I get.

Anything else I could do to pin point the issue?

Ciao,
  ...David


-- 
// david lebel <lebel@{lebel.org,nobiaze.com,openbsd.org}> //
// http://www.lebel.org/           http://www.nobiaze.com/ //
// pgp: 3633 6999 D47E 73ED 099F  4341 08A4 8E48 EF56 61D1 //



More information about the Spambayes mailing list