使用Python 3.8.0在iCalendar上的错误代码

2024-10-04 11:27:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在python3.8.0中使用iCalendar模块。这个link about parsing files非常有用,所以我的脚本看起来像:

from icalendar import Calendar

timetable = open('Stundenplan21-28.ics', 'rb')
cal = Calendar.from_ical(timetable.read())

timetable.close()

(“Stundenplan21-28.ics”是下载的.ics时间表,不包含任何错误)

但我收到了这个错误代码:

ValueError: Content line could not be parsed into parts: 'B

这个错误代码是什么意思?我怎样才能避免呢


Tags: 模块fromimport脚本linkfilescalendaricalendar