[Spambayes] hammie's dbm file has changed
Neale Pickett
neale@woozle.org
Mon Nov 18 02:48:46 2002
So then, Ranieri J D Severiano <rjdsnet@yahoo.com> is all like:
> ranieri@uyrapuru:spambayes$ ./hammie.py -s ~/Mail/bulkmail
> Traceback (most recent call last):
> File "./hammie.py", line 497, in ?
> main()
> File "./hammie.py", line 459, in main
> bayes = createbayes(pck, usedb, mode)
> File "./hammie.py", line 401, in createbayes
> bayes = pickle.load(fp)
> File "/usr/lib/python2.2/copy_reg.py", line 40, in _reconstructor
> obj = base.__new__(cls, state)
> TypeError: ('object.__new__(X): X is not a type object (class)', <function _reconstructor at 0x8148cd4>, (<class classifier.Bayes at 0x82103b4>, <type 'object'>, None))
Yikes!
I'm pretty sure I didn't change anything that would affect the way
pickles are stored (they don't use PersistentGrahamBayes or the DBDict
classes), but it sure does look like *something* has changed for you.
Unfortunately, SF CVS is down for the day, so I can't check to see
what's changed between those versions.
> >>> from cPickle import load
> >>> f = open('hammie.db')
> >>> o = load(f)
Could you try the same thing, importing load from pickle instead? It
will give a better traceback. I don't know enough yet about how the
pickling works to be able to diagnose this without some more information
first.
Neale
More information about the Spambayes
mailing list