[Spambayes] Win32 Command Line
tameyer at ihug.co.nz
Thu Oct 14 02:33:16 CEST 2004
> Again, thanks a million. I have an idea... Do you know where
> I can find an example (for a dozen) of PERFECTLY formed mbox
> messages so I can eliminate parsing errors from the equation?
The archives to this list should work:
<http://mail.python.org/pipermail/spambayes/>. I guess you should weed out
any spam in there, but the rest ought to be correctly formed.
> When I call the file as such:
> sb_filter.py < spam1.mai
> It ends up calling the function getmbox with the argument name = "-".
> This forces a call to get_message(sys.stdin)
> get_message then checks whether or not the passed object is a
> message object, which it is not. It then checks to see if
> the passed object supports "read". Which sys.stdin DOES.
> So, then it tries to perform a read and bombs. Here's the
> code in question... (leading comments removed)
> It's failing on "obj = obj.read()"
> To me, this seesm like an odd place to bomb. Why would
> reading from sys.stdin fail? Is something amiss with my
> python installation, perhaps? This is my first attempt at
> python and I'm not sure where to start looking for these answers.
I should have googled in the first place :) Apparently this is a Windows
bug - there's an explanation here:
C:\python23\python sb_filter.py < spam1.mai
And see if that works.
Please always include the list (spambayes at python.org) in your replies
(reply-all), and please don't send me personal mail about SpamBayes. This
way, you get everyone's help, and avoid a lack of replies when I'm busy.
More information about the Spambayes