[Spambayes] [spambayes-dev] tte.py not working with zodb - no spam/ham counts

Tony Meyer tony.meyer at gmail.com
Fri Jun 30 03:31:13 CEST 2006


> I'm trying to finish switching from bsddb to zodb.
[...]
> Seems to work fine (it spits out all the usual chattiness about number of
> messages trained and missed), but when I run sb_dbexpimp.py on the
> result it shows 0 ham and 0 spam and generates a csv file with just
>
>     0,0

As far as I can see contrib/tte.py just uses the standard classifier
interface ("learn", "unlearn", "spamprob"), right?  That should work
fine with ZODB - it should automatically persist all attributes,
including "nham" and "nspam".

It appears to work for me (although I'm really not familiar with tte.py).

Are you telling sb_dbexpimp.py it's a ZODB?

Marshall:~/spambayes tameyer$ env PYTHONPATH=. python contrib/tte.py
-g ham.mbox -s spam.mbox -R -o Storage:persistent_use_database:zodb -o
Storage:persistent
_storage_file:./hammie.fs -c .cull -v
No handlers could be found for logger "ZODB.FileStorage"
*** round 1 ***
    2miss ham: 0.500000 <1060756493-6904164 at quibble.com>
miss spam: 0.000000 <1060756493-6904164 at quibble.com>
round:  1, msgs:    2, ham misses:   1, spam misses:   1, 0.5s
[snip round 2 to round 9]
*** round 10 ***
    2miss ham: 0.500000 <1060756493-6904164 at quibble.com>
miss spam: 0.500000 <1060756493-6904164 at quibble.com>
round: 10, msgs:    2, ham misses:   1, spam misses:   1, 0.4s
writing new ham mbox...
    1 of     1
writing new spam mbox...
    1 of     1
Marshall:~/spambayes tameyer$ env PYTHONPATH=. python scripts/sb_dbexpimp.py -e
 -f test.csv -o Storage:persistent_storage_file:./hammie.fs -o
Storage:persistent_use_database:zodb
No handlers could be found for logger "ZODB.FileStorage"
Exporting database /Users/tameyer/spambayes/./hammie.fs to file test.csv
Database has 10 ham, 10 spam, and 1903 words

=Tony.Meyer


More information about the SpamBayes mailing list