pJust van Rossum]
... However, I did a cvs up today, and unpickling the database stopped working, as classifier.Bayes became a classic class. After some twiddling I managed to repair it, but now I get AssertionErrors during training:
I suppose it would have worked to restore the inheritance from object long enough to open the old pickle, then copy the contents into an instance of the changed class and pickle that.
[python:~/code/spambayes] just% ./hammie.py -g mymail/good.mbox.fix Training ham (mymail/good.mbox.fix): 4 Traceback (most recent call last): File "./hammie.py", line 483, in ? main() File "./hammie.py", line 460, in main h.update_probabilities() File "./hammie.py", line 336, in update_probabilities self.bayes.update_probabilities() File "classifier.py", line 327, in update_probabilities assert hamcount <= nham AssertionError
Is my db screwed or is it repairable?
It's obviously screwed, and whether it's repairable depends on exactly what "some twiddling" meant. I'm sure you've built a new from scratch by now, though!