[Spambayes] AssertionError: assert spamcount <= nspam ??
Gregory Gulik
greg at gulik.org
Tue May 3 16:59:04 CEST 2005
Tony Meyer wrote:
> Once it's happened, it will continue to happen (for any message that has the
> bad tokens in it) until the database is fixed. Hopefully upgrading will
> prevent it happening again, though.
>
> There are two ways to fix this problem:
>
> * Remove the existing database and retrain from scratch (recommended,
> since there might be other problems with the database, which this would
> fix).
Aargh! I just painstakingly rebuilt my database by creating as accurate
a spam and ham files as I could.
> * Convert the database to CSV (with the sb_dbexpimp.py script), open it in
> a text editor or spreadsheet, and change the initial two numbers to be
> greater than or equal to the numbers in the ham/spam columns (that should
> make more sense once you're looking at the file).
[greg at server ~]$ sb_dbexpimp.py -e -p .hammiedb -f hammiedb.csv
Traceback (most recent call last):
File "/usr/bin/sb_dbexpimp.py", line 273, in ?
runExport(dbFN, useDBM, flatFN)
File "/usr/bin/sb_dbexpimp.py", line 140, in runExport
bayes = spambayes.storage.open_storage(dbFN, useDBM)
File "/usr/lib/python2.3/site-packages/spambayes/storage.py", line
710, in open_storage
return klass(data_source_name)
File "/usr/lib/python2.3/site-packages/spambayes/storage.py", line
91, in __init__
self.load()
File "/usr/lib/python2.3/site-packages/spambayes/storage.py", line
114, in load
tempbayes = pickle.load(fp)
EOFError
Suggestions?
Anyway, this corruption of tokens sounds like a bug to me.
--
Greg Gulik http://www.gulik.org/greg/
greg @ gulik.org
More information about the Spambayes
mailing list