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 serhiy.storchaka
Recipients Alexander.Kruppa, barry, r.david.murray, serhiy.storchaka
Date 2013-02-07.18:02:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1360260167.01.0.148817147359.issue16564@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import io, email
>>> bytesdata = b'\xfa\xfb\xfc\xfd\xfe\xff'
>>> msg = email.mime.application.MIMEApplication(bytesdata, _encoder=encoders.encode_7or8bit)
>>> s = io.BytesIO()
>>> g = email.generator.BytesGenerator(s)
>>> g.flatten(msg)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython3.2/Lib/email/generator.py", line 91, in flatten
    self._write(msg)
  File "/home/serhiy/py/cpython3.2/Lib/email/generator.py", line 137, in _write
    self._dispatch(msg)
  File "/home/serhiy/py/cpython3.2/Lib/email/generator.py", line 163, in _dispatch
    meth(msg)
  File "/home/serhiy/py/cpython3.2/Lib/email/generator.py", line 393, in _handle_text
    if _has_surrogates(msg._payload):
TypeError: can't use a string pattern on a bytes-like object
History
Date User Action Args
2013-02-07 18:02:47serhiy.storchakasetrecipients: + serhiy.storchaka, barry, r.david.murray, Alexander.Kruppa
2013-02-07 18:02:47serhiy.storchakasetmessageid: <1360260167.01.0.148817147359.issue16564@psf.upfronthosting.co.za>
2013-02-07 18:02:47serhiy.storchakalinkissue16564 messages
2013-02-07 18:02:46serhiy.storchakacreate