我試圖從一個Plone 3.3.5網站刪除P4Artists日曆,將它升級到4.0.7的Plone。擺脫Plone4Artists日曆 - 遷移自Plone的3.3.5至4.0.7的Plone
我跑到一個腳本來從所有對象中刪除所有的接口,特別是:
'p4a.subtyper.interfaces.ISubtyped', 'p4a.calendar.interfaces.ICalendarEnhanced', 'p4a.calendar.interfaces.IPossibleCalendar', 'p4a.calendar.interfaces.ICalendarConfig', 'p4a.calendar.interfaces.IEventProvider', 'p4a.calendar.interfaces.IEvent', 'p4a.calendar.interfaces.IBasicCalendarSupport', 'p4a.calendar.interfaces.ICalendarSupport'
腳本我使用用途zope.interfaces.noLongerProvides擺脫他們的對象。首先,我執行目錄搜索並使用接口查找對象,然後noLongerProvides(object,interface)。
這樣做之後,我可以將它們全部刪除接口,除了「p4a.calendar.interfaces.IPossibleCalendar」。此接口似乎適用於網站上的所有文件夾和收藏集,並且在嘗試刪除它們時,我會遇到異常。有沒有人知道更多的這個界面,以及擺脫它的正確方法是什麼?
編輯:
這裏是我的腳本生成的錯誤信息:
Exception at removeinterfaces for interface p4a.calendar.interfaces.IPossibleCalendar
Exception type: exceptions.ValueError
Exception value: Can only remove directly provided interfaces.
Exception traceback (starting next line):
File "remove-p4a.py", line 53, in removeinterfaces
noLongerProvides(obj, interface)
File "d:\plone-3.3.5-teste-20110927\zope2\lib\python\zope\interface\declarations.py",line 969, in noLongerProvides
raise ValueError("Can only remove directly provided interfaces.")
你能發佈錯誤嗎? – vangheem