[spambayes-bugs] [ spambayes-Bugs-945227 ] Training error: _handle_text

SourceForge.net noreply at sourceforge.net
Sun May 2 22:00:21 EDT 2004


Bugs item #945227, was opened at 2004-04-30 23:25
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=945227&group_id=61702

>Category: None
Group: Source code 1.0a9 (0.9)
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Jinn Koriech (djinnii)
Assigned to: Tony Meyer (anadelonbrin)
Summary: Training error: _handle_text

Initial Comment:
I'm using 1.0a9 compiled on Gentoo.

I've traced a training problem down to a particular
email.  Relevant output of (sb_imapfilter.py -t -v -i6)
is as follows.  I'll keep the message for a while, so
if you need more info I can get it for you.

15:42.87 untagged_responses[FETCH] => [('1 (UID 597
RFC822 {2876}', 'Return-Path:
<ulhhohuw at swbell.net>\r\nReceived: from nova ([unix
socket])\r\n\tby nova (Cyrus v2.1.15) with LMTP; Sun,
25 Apr 2004 21:27:04 +0100\r\nX-Sieve: CMU Sieve
2.2\r\nReceived: from localhost (localhost
[127.0.0.1])\r\n\tby nova.hidden-from.you (Postfix)
with ESMTP id 51EC3BB442\r\n\tfor <user at localhost>;
Sun, 25 Apr 2004 21:27:04 +0100 (BST)\r\nReceived: from
localhost\r\n\tby localhost with POP3
(fetchmail-6.2.3)\r\n\tfor user at localhost
(single-drop); Sun, 25 Apr 2004 21:27:04 +0100
(BST)\r\nReceived: from
MG216122098.user.veloxzone.com.br
(MG216122098.user.veloxzone.com.br [200.216.122.98]
(may be forged))\r\n\tby hidden-from.you
(8.11.7/8.11.7) with SMTP id i3PKNFU01417\r\n\tfor
<user at hidden-from.you>; Sun, 25 Apr 2004 21:23:20
+0100\r\nDelivered-To:
<user at hidden-from.you>\r\nReceived: from 173.116.16.112
by web517.mail.yahoo.com; Mon, 26 Apr 2004 00:19:10
-0200\r\nMessage-ID:
<LJQXUOBRVUNATOWOJHAA at pacbell.net>\r\nFrom: "Kurtis 
Wynn" <ulhhohuw at swbell.net>\r\nTo:
user at hidden-from.you\r\nSubject: Complete the online
form\r\nDate: Mon, 26 Apr 2004 05:13:10
+0300\r\nMIME-Version: 1.0\r\nContent-Type:
text/html;\r\n\tboundary="--36286347126953001862"\r\nX-CS-IP:
106.14.250.116\r\n\r\n----36286347126953001862\r\nContent-Type:
text/html;\r\nContent-Transfer-Encoding:
7Bit\r\n\r\n<html><meta http-equiv="Content-Type"
content="text/html;
charset=windows-1252">\r\n<br>\r\nMo.rtgage R.ates are
at Historic Lows!\r\n<p>\r\nEven if you\'ve recently
closed on a property, now is the time\r\nto check your
numbers.\r\n<p>\r\n*Lowest I.nterest R.ates in
Years<br>\r\n*S.AVE $200-$500 per month<br>\r\n*Bad
C.redit is NOT a problem<br>\r\n*No Out of Pocket
Expense<br>\r\n<p>\r\n<b><a
href="http://www.expeditemortgage.net/?mal">Apply
Now</a></b>\r\n<P><p><p><font color=#CCCCCC>caldwell
preemptor deaconess befuddle slain quick bloodshot
gnomonic correlate timon atomic editorial future
dieldrin dragonfly wednesday piecemeal cereus hansel
sanitary bass manchester shipwreck earthquake pile
cockle establish  exchequer aberrant documentation
betroth whipple austria blake elongate sainthood
marinate dogging doghouse  glacis asocial coset andy
sniffly exterminate crystallographer hayden bide cloven
osha humanitarian attribute bracken conduct anorthite
carlson parlay emasculate upraise kleenex rout ate tout
doric crupper hateful concede  decorum deputy footwear
vengeful elegy armata upstater attorney hayden
prudential gerundive hate aggression cemetery amplify
decompression tombstone taint blaze zippy mcgowan
abrogate pitt pretend scuba fisherman password tum duff
apse bleeker sacrilege   pornographer sudan bolshevism
midwife kettering affiliate diagrammatic soignee
plaintive earn chairperson bill congressman
discriminant sunlit baptism kleenex scottish juliet
math ailanthus charlottesville </font>\r\n<br>\r\n<a
href="http://www.expeditemortgage.net/100/">re.move</a><br>\r\n</html>\r\n\r\n----36286347126953001862--\r\n\r\n'),
')']
  15:42.88 > EDGI121 UID FETCH 597 (FLAGS INTERNALDATE)
  15:42.89 < * 1 FETCH (FLAGS (\Seen) UID 597
INTERNALDATE "25-Apr-2004 21:27:04 +0100")
  15:42.89      matched r'\* (?P<data>\d+)
(?P<type>[A-Z-]+)( (?P<data2>.*))?' => ('1', 'FETCH', '
(FLAGS (\Seen) UID 597 INTERNALDATE "25-Apr-2004
21:27:04 +0100")', '(FLAGS (\Seen) UID 597
INTERNALDATE "25-Apr-2004 21:27:04 +0100")')
  15:42.89 untagged_responses[FETCH] 0 += ["1 (FLAGS
(\Seen) UID 597 INTERNALDATE "25-Apr-2004 21:27:04
+0100")"]
  15:42.89 < EDGI121 OK Completed
  15:42.89      matched r'(?P<tag>EDGI\d+)
(?P<type>[A-Z]+) (?P<data>.*)' => ('EDGI121', 'OK',
'Completed')
  15:42.89 untagged_responses[FETCH] => ['1 (FLAGS
(\Seen) UID 597 INTERNALDATE "25-Apr-2004 21:27:04
+0100")']
*Traceback (most recent call last):
  File "/usr/bin/sb_imapfilter.py", line 857, in ?
    run()
  File "/usr/bin/sb_imapfilter.py", line 843, in run
    imap_filter.Train()
  File "/usr/bin/sb_imapfilter.py", line 690, in Train
    num_spam_trained = folder.Train(self.classifier, True)
  File "/usr/bin/sb_imapfilter.py", line 601, in Train
    for msg in self:
  File "/usr/bin/sb_imapfilter.py", line 528, in __iter__
    yield self[key]
  File "/usr/bin/sb_imapfilter.py", line 577, in
__getitem__
    msg.Save()
  File "/usr/bin/sb_imapfilter.py", line 443, in Save
    self.as_string())
  File
"/usr/lib/python2.3/site-packages/spambayes/message.py",
line 277, in as_string
    return
self._force_CRLF(email.Message.Message.as_string(self))
  File "/usr/lib/python2.3/email/Message.py", line 130,
in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/usr/lib/python2.3/email/Generator.py", line
102, in flatten
    self._write(msg)
  File "/usr/lib/python2.3/email/Generator.py", line
130, in _write
    self._dispatch(msg)
  File "/usr/lib/python2.3/email/Generator.py", line
156, in _dispatch
    meth(msg)
  File "/usr/lib/python2.3/email/Generator.py", line
199, in _handle_text
    raise TypeError, 'string payload expected: %s' %
type(payload)
TypeError: string payload expected: <type 'list'>

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

>Comment By: Tony Meyer (anadelonbrin)
Date: 2004-05-03 14:00

Message:
Logged In: YES 
user_id=552329

This is a bug with the parsing of the email and has been
reported a few times recently.  We're working on a fix for
this and will hopefully check one in soon.

For the moment, I've updated imapfilter to handle this more
gracefully, as it should.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=945227&group_id=61702



More information about the Spambayes-bugs mailing list