使用Anaconda2-5.0.0-Windowsx86_64,Python2.7,exchangelib 1.10.4
我试图保存从一个交换帐户的所有电子邮件附件。似乎我可以毫无问题地连接到这个帐户,但是每次我试图运行这个过程时,它都会给我一个错误消息。下面是我尝试过的代码:
mailbox = account.inbox
for msg in mailbox.all():
for attachment in msg.attachments:
fpath = os.path.join(r'C:\temp', attachment.name)
with open(fpath, 'wb') as f:
f.write(attachment.content)我得到的错误是:
'FieldURI‘属性无效--根据其数据类型'http://schemas.microsoft.com/exchange/services/2006/types:UnindexedFieldURIType’,值'item:IsAssociated‘无效--枚举约束失败。
该收件箱上的邮件包含CSV文件附件,该邮箱目前存储了23条邮件。
发布于 2017-10-18 07:14:45
当连接到Exchange 2007服务器时,这是exchangelib中的一个错误。修正了https://github.com/ecederstrand/exchangelib/commit/8561bd0f3e6bfd7c8d01bc57cbcc3dca3cf33fc4和https://github.com/ecederstrand/exchangelib/commit/3609fa23e403821bdc5f80cd896a9df1d73f0275
https://stackoverflow.com/questions/46767793
复制相似问题