[Spambayes] mboxtrain.py crashes

Tim Stone - Four Stones Expressions tim at fourstonesExpressions.com
Thu Mar 6 06:29:18 EST 2003


Jean-Marc, please report this as a bug so we can track it.  You can do that at 
http://sourceforge.net/projects/spambayes/  Otherwise, your report will get 
lost in the mailing list noise.  Thanks.

3/5/2003 11:44:31 PM, Jean-Marc Valin <jean-marc.valin at hermes.usherb.ca> 
wrote:

>Hi,
>
>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
>
>	Jean-Marc
>
>-- 
>Jean-Marc Valin, M.Sc.A.
>LABORIUS (http://www.gel.usherb.ca/laborius)
>Université de Sherbrooke, Québec, Canada
>
>


c'est moi - TimS
http://www.fourstonesExpressions.com
http://wecanstopspam.org





More information about the Spambayes mailing list