This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients georg.brandl, pitrou, r.david.murray
Date 2013-02-02.20:13:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359836024.9.0.950016138746.issue17106@psf.upfronthosting.co.za>
In-reply-to
Content
I came across this by making a mistake, but it shouldn't crash:

rdmurray@hey:~/python/p32>touch temp
rdmurray@hey:~/python/p32>./python  
Python 3.2.3+ (3.2:e6952acd5a55+, Feb  2 2013, 15:04:21) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email import message_from_binary_file as mb
>>> m = mb(open('temp'))
python: ./Modules/_io/textio.c:1454: textiowrapper_read_chunk: Assertion `((((((PyObject*)(input_chunk))->ob_type))->tp_flags & ((1L<<27))) != 0)' failed.
zsh: abort      ./python


This is a regression relative to 3.2.3:

Python 3.2.3 (default, Sep 16 2012, 16:35:39) 
[GCC 4.5.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from email import message_from_binary_file as mb
>>> m = mb(open('temp'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/email/__init__.py", line 63, in
message_from_binary_file
    return BytesParser(*args, **kws).parse(fp)
  File "/usr/lib/python3.2/email/parser.py", line 124, in parse
    return self.parser.parse(fp, headersonly)
  File "/usr/lib/python3.2/email/parser.py", line 68, in parse
    data = fp.read(8192)
  File "/usr/lib/python3.2/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
TypeError: 'str' does not support the buffer interface
History
Date User Action Args
2013-02-02 20:13:44r.david.murraysetrecipients: + r.david.murray, georg.brandl, pitrou
2013-02-02 20:13:44r.david.murraysetmessageid: <1359836024.9.0.950016138746.issue17106@psf.upfronthosting.co.za>
2013-02-02 20:13:44r.david.murraylinkissue17106 messages
2013-02-02 20:13:44r.david.murraycreate