[spambayes-bugs] [ spambayes-Bugs-1816240 ] General pickle corruption problems

SourceForge.net noreply at sourceforge.net
Fri Oct 19 19:29:38 CEST 2007


Bugs item #1816240, was opened at 2007-10-18 23:38
Message generated for change (Comment added) made by david_abrahams
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: Source code - CVS
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: David Abrahams (david_abrahams)
Assigned to: Nobody/Anonymous (nobody)
>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: 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


More information about the Spambayes-bugs mailing list