導入UTC我試圖運行包含以下行的舊腳本:無法從的iCalendar
from icalendar import UTC
這給了我以下錯誤:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name UTC
所以我檢查了變化日誌icalendar
其規定如下:
Renamed the
UTC
class toUtc
, so it would not clash with theUTC
object, since that rendered theUTC
object unpicklable.
我改變UTC
到Utc
,仍然會得到相同的錯誤。
我該如何擺脫這個錯誤?