【发布时间】:2018-10-28 08:41:37
【问题描述】:
我正在尝试通过 Python 访问我的 Fastmail 日历。我正在使用this answer 建议的caldav 模块。这是我的代码的样子:
def main():
auth = HTTPBasicAuth(username='mail@domain.com', password='myapplicationpassword')
client = caldav.DAVClient('https://caldav.fastmail.com', auth=auth)
try:
client.principal()
except Exception as e:
print(e)
而client.principal() 引发异常:
404 Not Found
b'<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor="white">\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n'
我也尝试了client = caldav.DAVClient('https://caldav.fastmail.com', username='mail@domain.com', password='myapplicationpassword') 并获得了相同的结果。
最后,我查看了caldav example using iCloud,并尝试用 fastmail 重现相同的想法。我遇到了同样的问题(principal_response 有一个 404 状态码)。
我错过了什么?
【问题讨论】: