from email.header import decode_header
a = 'QW5tZWxkdW5nIE5ldHphbnNjaGx1c3MgU_xkcmluZzNwLmpwZw=='
decode_header(a)
a1 = a.replace('_', '/')
decode_header(a1)
print(_[0][0].decode(_[0][1]))
HeaderParseError in python