[spambayes-dev] Error with the new FeedParser

Skip Montanaro skip at pobox.com
Sat May 15 00:15:43 EDT 2004

I cvs up'd my Python tree today and reinstalled (I generally run from CVS
HEAD, silly me I suppose).  I quickly got a failure from some of my
collected spam when running tte.py.  Isolating the culprit message
(attached) I ran it through sb_filter.py using

    sb_filter.py spam10

and got this traceback:

    Traceback (most recent call last):
      File "/Users/skip/local/bin/sb_filter.py", line 257, in ?
      File "/Users/skip/local/bin/sb_filter.py", line 246, in main
        for msg in mbox:
      File "/Users/skip/local/lib/python2.4/mailbox.py", line 35, in next
        return self.factory(_Subfile(self.fp, start, stop))
      File "/Users/skip/local/lib/python2.4/site-packages/spambayes/mboxutils.py", line 129, in get_message
        msg = email.message_from_string(obj)
      File "/Users/skip/local/lib/python2.4/email/__init__.py", line 45, in message_from_string
        return Parser(_class, strict=strict).parsestr(s)
      File "/Users/skip/local/lib/python2.4/email/Parser.py", line 67, in parsestr
        return self.parse(StringIO(text), headersonly=headersonly)
      File "/Users/skip/local/lib/python2.4/email/Parser.py", line 56, in parse
      File "/Users/skip/local/lib/python2.4/email/FeedParser.py", line 145, in feed
      File "/Users/skip/local/lib/python2.4/email/FeedParser.py", line 149, in _call_parse
      File "/Users/skip/local/lib/python2.4/email/FeedParser.py", line 317, in _parsegen
        mo = boundaryre.match(line)
    TypeError: expected string or buffer

I'll file a bug report on SF against the email package, but I thought I'd
also post here in case Barry or Anthony are awake at this hour...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 215750 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes-dev/attachments/20040514/bbe95114/attachment-0001.obj

More information about the spambayes-dev mailing list