问题描述
我已经使用Python和日历库创建了一个.ics文件。下面给出一个示例文件。此示例包含三个事件,在现实生活中,将是类的时间表事件。
I have created an .ics file using Python and the calendar library. An example file is given below. This example contains three events which, in real life, would be timetable events for a class.
b'BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//Python iCalendar timetable//\r\nBEGIN:VEVENT\r\nSUMMARY:COURSE NAME 2016-17 LECTURE - abc (A.N.Other)\r\nDTSTART;TZID=Europe/London;VALUE=DATE-TIME:20161011T160000\r\nDTEND;TZID=Europe/London;VALUE=DATE-TIME:20161011T170000\r\nDTSTAMP;VALUE=DATE-TIME:20160923T015643Z\r\nUID:20161011160000/abc/course2016-17\r\nLOCATION:Room1232\r\nORGANIZER;CN=A.N.Other;ROLE=Boss:MAILTO:[email protected]\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nSUMMARY:COURSE NAME 2016-17 LECTURE - def (John Smith)\r\nDTSTART;TZID=Europe/London;VALUE=DATE-TIME:20161012T110000\r\nDTEND;TZID=Europe/London;VALUE=DATE-TIME:20161012T120000\r\nDTSTAMP;VALUE=DATE-TIME:20160923T015643Z\r\nUID:20161012110000/def/course2016-17\r\nLOCATION:Room334\r\nORGANIZER;CN=A.N.Other;ROLE=Boss:MAILTO:[email protected]\r\nEND:VEVENT\r\nBEGIN:VEVENT\r\nSUMMARY:COURSE NAME 2016-17 LECTURE - ghi (Jane Doe)\r\nDTSTART;TZID=Europe/London;VALUE=DATE-TIME:20161014T100000\r\nDTEND;TZID=Europe/London;VALUE=DATE-TIME:20161014T110000\r\nDTSTAMP;VALUE=DATE-TIME:20160923T015643Z\r\nUID:20161014100000/ghi/course2016-17\r\nLOCATION:Room442\r\nORGANIZER;CN=A.N.Other;ROLE=Boss:MAILTO:[email protected]\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n'
.ics文件验证使用
The .ics file produced validates using http://severinghaus.org/projects/icv/
当使用运行El Capitan的Mac上的日历打开ics文件时,会导入事件进入所选的Exchange日历。但是,完成后,日历然后拒绝连接到Exchange服务器以同步日历。例如,如果我尝试添加被邀请者,则会显示错误消息:
When the ics file is opened using Calendar on a Mac running El Capitan the events are imported into the selected Exchange calendar. However, having done that, Calendar then refuses to connect to the Exchange Server to sync the calendars. If I try to add an invitee, for example, an error message is displayed:
Calendar can’t save the event "COURSE NAME 2016-17 LECTURE - abc (A.N.Other)" to the Exchange server.
There was an error attempting to send your changes to the exchange server.
如果我删除日历,我可以手动添加事件将被上传到Exchange服务器没有问题。
If I delete the calendar, I can then add events manually which will be uploaded to the exchange server with no problems.
所以似乎从ics文件上传的事件导致一个问题,阻止日历连接到Exchange服务器。
So it seems that uploaded the events from the ics file causes a problem that prevents Calendar connecting to the Exchange Server.
显示的.ics文件中编码的事件是否会导致阻止日历连接到Exchange Server的问题?
Is there any reason why the events coded in the .ics file shown should cause a problem that prevents Calendar connecting to the Exchange Server?
推荐答案
我不知道为什么,但似乎在.ics文件中包含LOCATION字段可能已经导致一些问题。我在,以查看是否有人回答。
I've no idea why but it seems that including a LOCATION field in the .ics file may have been causing some problems. I've started a new question at Including a LOCATION field in an .ics calendar file stops Calendar on MacOS El Capitan communicating with Exchange Server to see if anyone has an answer.
这篇关于将.ics导入Mac(El Capitan)日历中断与Exchange Server的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!