exchangelib从任务查询集获取任务此项目不支持MIME转换

时间:2017-11-15 17:26:49

标签: python-3.x exchangelib

我正在尝试访问一个对象 通过使用exchangelib创建的查询集但是我收到错误MIME转换不支持这个项目,我不知道它意味着什么。我已经尝试了与日历项目相同的代码,我没有任何问题。感谢

from exchangelib import Account, Credentials, DELEGATE

credentials = Credentials(username='BUREAU\\pepe', password='pepe')

pepe_account = Account(
    primary_smtp_address='pepe@office.com',
    credentials=credentials,
    autodiscover=True,
    access_type=DELEGATE)

tasks = pepe_account.tasks.filter()
print(tasks) -- Works
for task in tasks:
    print(task)

迭代失败,而不是打印(任务)我也试过通过,我收到相同的消息。

Traceback (most recent call last):
  File "test.py", line 13, in <module>
    for task in tasks:
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/queryset.py", line 197, in __iter__
    for val in result_formatter(self._query()):
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/queryset.py", line 272, in _as_items
    for i in iterable:
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/account.py", line 393, in fetch
    for i in GetItem(account=self).call(items=ids, additional_fields=additional_fields, shape=IdOnly):
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/services.py", line 456, in _pool_requests
    for elem in elems:
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/services.py", line 283, in _get_elements_in_response
    container_or_exc = self._get_element_container(message=msg, name=self.element_container_name)
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/services.py", line 256, in _get_element_container
    self._raise_errors(code=response_code, text=msg_text, msg_xml=msg_xml)
  File "/home/pepe/.local/lib/python3.5/site-packages/exchangelib/services.py", line 273, in _raise_errors
    raise vars(errors)[code](text)
exchangelib.errors.ErrorUnsupportedMimeConversion: MIME conversion is not supported for this item type.

0 个答案:

没有答案