Python quopriMIME.py中的一个问题

来源:互联网 发布:flex布局 仿软件 编辑:程序博客网 时间:2024/04/29 13:07

今天在用Python写一个发带有附件的邮件时,发现程序总是出错,仔细看看,是提示在email/quopriMIME.py的第79行提示:

  File "C:/Python24/lib/email/quopriMIME.py", line 79, in _max_append
    L.append(s.lstrip())
AttributeError: 'tuple' object has no attribute 'lstrip'

tuple当然是没有lstrip函数了,看来是类型判断错误!改为:

L.append(str(s).lstrip())

后一切正常!

原创粉丝点击