[spambayes-bugs] [ spambayes-Bugs-698796 ] mboxtrain.py crashes on some mbox data
SourceForge.net
noreply at sourceforge.net
Sun Apr 30 16:55:24 CEST 2006
Bugs item #698796, was opened at 2003-03-06 16:09
Message generated for change (Comment added) made by tdgsandf
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=698796&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jean-Marc Valin (jmvalin)
Assigned to: Nobody/Anonymous (nobody)
Summary: mboxtrain.py crashes on some mbox data
Initial Comment:
I'm trying to train a spam database and I'm
experiencing crashes with mboxtrain.py. I'm attaching
three mbox's (simplified to their offending e-mail)
that produce the crash. This happens with both CVS and
the last nightly build (tried both python 2.2 and
2.3a2). The message printed is:
Traceback (most recent call last):
File "mboxtrain.py", line 284, in ?
main()
File "mboxtrain.py", line 271, in main
train(h, g, False, force)
File "mboxtrain.py", line 209, in train
mbox_train(h, path, is_spam, force)
File "mboxtrain.py", line 140, in mbox_train
for msg in mbox:
File "/opt//lib/python2.3/mailbox.py", line 35, in next
return self.factory(_Subfile(self.fp, start, stop))
File "/software/spambayes/spambayes/mboxutils.py",
line 116, in
get_message
msg = email.message_from_string(obj)
File "/opt//lib/python2.3/email/__init__.py", line 52, in
message_from_string
return Parser(_class, strict=strict).parsestr(s)
File "/opt//lib/python2.3/email/Parser.py", line 75,
in parsestr
return self.parse(StringIO(text),
headersonly=headersonly)
File "/opt//lib/python2.3/email/Parser.py", line 64,
in parse
self._parsebody(root, fp, firstbodyline)
File "/opt//lib/python2.3/email/Parser.py", line 239,
in _parsebody
msgobj = self.parsestr(part)
File "/opt//lib/python2.3/email/Parser.py", line 75,
in parsestr
return self.parse(StringIO(text),
headersonly=headersonly)
File "/opt//lib/python2.3/email/Parser.py", line 64,
in parse
self._parsebody(root, fp, firstbodyline)
File "/opt//lib/python2.3/email/Parser.py", line 146,
in _parsebody
boundary = container.get_boundary()
File "/opt//lib/python2.3/email/Message.py", line
701, in get_boundary
boundary = self.get_param('boundary', missing)
File "/opt//lib/python2.3/email/Message.py", line
566, in get_param
for k, v in self._get_params_preserve(failobj, header):
File "/opt//lib/python2.3/email/Message.py", line 516, in
_get_params_preserve params =
Utils.decode_params(params)
File "/opt//lib/python2.3/email/Utils.py", line 337,
in decode_params
charset, language, value =
decode_rfc2231(EMPTYSTRING.join(value))
File "/opt//lib/python2.3/email/Utils.py", line 283,
in decode_rfc2231
charset, language, s = s.split("'", 2)
ValueError: unpack list of wrong size
----------------------------------------------------------------------
Comment By: Thomas Sandford (tdgsandf)
Date: 2006-04-30 15:55
Message:
Logged In: YES
user_id=398314
This error still occurs with spambayes 1.0.4 and Python
2.4.3.
The full error message for the final element in the stack
trace now reads:
File "/usr/local/lib/python2.4/email/Utils.py", line 222,
in decode_rfc2231
charset, language, s = parts
ValueError: need more than 2 values to unpack
----------------------------------------------------------------------
Comment By: Tony Meyer (anadelonbrin)
Date: 2005-01-21 04:31
Message:
Logged In: YES
user_id=552329
Noting dupe in [ 963134 ] sb_mboxtrain.py fails to output
some messages
http://sourceforge.net/tracker/index.php?func=detail&aid=963134&group_id=61702&atid=498103
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=698796&group_id=61702
More information about the Spambayes-bugs
mailing list