Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8759
| From | Thomas Guettler <hv@tbz-pariv.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | HeaderParseError |
| Date | 2011-07-04 10:31 +0200 |
| Message-ID | <97dc37F7gaU1@mid.individual.net> (permalink) |
Hi,
I get a HeaderParseError during decode_header(), but Thunderbird can
display the name.
>>> from email.header import decode_header
>>> decode_header('=?iso-8859-1?B?QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw==?=')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/email/header.py", line 101, in decode_header
raise HeaderParseError
email.errors.HeaderParseError
How can I parse this in Python?
Thomas
Same question on Stackoverflow:
http://stackoverflow.com/questions/6568596/headerparseerror-in-python
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
HeaderParseError Thomas Guettler <hv@tbz-pariv.de> - 2011-07-04 10:31 +0200
Re: HeaderParseError Peter Otten <__peter__@web.de> - 2011-07-04 11:51 +0200
Re: HeaderParseError Thomas Guettler <hv@tbz-pariv.de> - 2011-07-04 12:38 +0200
Re: HeaderParseError Peter Otten <__peter__@web.de> - 2011-07-04 13:20 +0200
Re: HeaderParseError Thomas Guettler <hv@tbz-pariv.de> - 2011-07-05 14:02 +0200
csiph-web