Bugs item #1816240, was opened at 2007-10-18 23:38
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1816240&group_id=61702

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: hammie
>Group: 1.1.x
>Status: Pending
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: David Abrahams (david_abrahams)
>Assigned to: Skip Montanaro (montanaro)
Summary: General pickle corruption problems

Initial Comment:
saving 720 items to /home/dave/spambayes/imagecache.pck
Traceback (most recent call last):
  File "/usr/local/bin/sb_filter.py", line 290, in ?
    main()
  File "/usr/local/bin/sb_filter.py", line 281, in main
    action(msg)
  File "/usr/local/bin/sb_filter.py", line 199, in filter
    return self.h.filter(msg)
  File "/usr/local/lib/python2.4/site-packages/spambayes/hammie.py", line 156, 
in filter
    debug, train)
  File "/usr/local/lib/python2.4/site-packages/spambayes/hammie.py", line 110, 
in score_and_filter
    prob, clues = self._scoremsg(msg, True)
  File "/usr/local/lib/python2.4/site-packages/spambayes/hammie.py", line 39, 
in _scoremsg
    return self.bayes.spamprob(tokenize(msg), evidence)
  File "/usr/local/lib/python2.4/site-packages/spambayes/classifier.py", line 
196, in chi2_spampro
b
    clues = self._getclues(wordstream)
  File "/usr/local/lib/python2.4/site-packages/spambayes/classifier.py", line 
498, in _getclues
    for word in Set(wordstream):
  File "/usr/local/lib/python2.4/site-packages/spambayes/tokenizer.py", line 
1281, in tokenize
    for tok in self.tokenize_body(msg):
  File "/usr/local/lib/python2.4/site-packages/spambayes/tokenizer.py", line 
1640, in tokenize_bod
y
    from spambayes.ImageStripper import crack_images
  File "/usr/local/lib/python2.4/site-packages/spambayes/ImageStripper.py", 
line 391, in ?
    crack_images = ImageStripper(_cachefile).analyze
  File "/usr/local/lib/python2.4/site-packages/spambayes/ImageStripper.py", 
line 305, in __init__
    self.cache = pickle.load(open(self.cachefile))
ValueError: insecure string pickle


----------------------------------------------------------------------

>Comment By: Skip Montanaro (montanaro)
Date: 2007-10-21 21:47

Message:
Logged In: YES 
user_id=44345
Originator: NO

I don't understand what the hammie.py patch has to do with this.  I've
checked everything else
in.

----------------------------------------------------------------------

Comment By: David Abrahams (david_abrahams)
Date: 2007-10-19 12:29

Message:
Logged In: YES 
user_id=52572
Originator: YES

There is a safe method for storing pickles, but it isn't used
consistently, and there's code duplication.  The enclosed patch contains
fixes for the tte script and a few other things I've reported... the
dnscache changes are even related... but you *really* should apply the
whole thing ;-).
File Added: safe_pickle.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1816240&group_id=61702
_______________________________________________
Spambayes-bugs mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-bugs

Reply via email to