RE: [Spambayes] Error converting database to a pickle
I have tried converting my existing database to a pickle as I don't really want to loose my training, but I get the following error :-
C:\spambayes-1.0a6\scripts>sb_dbexpimp.py -e -D message_info_database.db -f message.export Traceback (most recent call last): File "C:\spambayes-1.0a6\scripts\sb_dbexpimp.py", line 262, in ? runExport(dbFN, useDBM, flatFN) File "C:\spambayes-1.0a6\scripts\sb_dbexpimp.py", line 110, in runExport words.remove(bayes.statekey) ValueError: list.remove(x): x not in list
This is quite strange, because the db really should have that statekey in there. You could simply try removing that line from sb_dbexpimp.py and looking at the file produced. If it looks right (i.e. a '`' separated file filled with lots of ham/spam counts), then keep going, otherwise report back.
I have also tried using the -d instead of -D, but that produced the following error :- [...] tempbayes = pickle.load(fp) EOFError
This is the expected error when trying to open a pickle as a dbm, as in this case. IOW, -D is right, even though it's opposite to the other scripts (sigh). =Tony Meyer
participants (1)
-
Meyer, Tony