从 3.3.5 迁移到 4.0.7 时,由 p4a.calendar.interfaces.ICalendarSupport 导致的 PicklingError

发布于 2024-12-07 05:47:23 字数 3742 浏览 1 评论 0原文

我正在尝试将 Plone 3.3.5 安装迁移到 4.0.7。

在迁移之前,决定删除 Plone4Artists Calendar。

我们遵循此处建议的程序 http://plone.org/documentation/kb/cleaning-p4a< /a>,将其应用于以下接口:

from p4a.calendar.interfaces import ICalendarEnhanced
from p4a.calendar.interfaces import IPossibleCalendar
from p4a.calendar.interfaces import ICalendarConfig
from p4a.calendar.interfaces import IEventProvider
from p4a.calendar.interfaces import IEvent
from p4a.calendar.interfaces import IBasicCalendarSupport
from p4a.calendar.interfaces import ICalendarSupport

显然,它有效(除了 IPossibleCalendar 接口,我收到一条“只能删除直接提供的接口。”消息)。为了删除它,我们卸载了该产品(遵循 此处

现在,将 Data.fs 从 3.3.5 移动到 4.0.7 安装后,并且尝试在 /Plone/@@plone-upgrade 激活迁移,我得到以下回溯:

Traceback (most recent call last):
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\plone-4.0.7-py2.6.egg\Products\CMFPlone\MigrationTool.py", line 175, in upgrade
    step['step'].doStep(setup)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\products.genericsetup-1.6.3-py2.6.egg\Products\GenericSetup\upgrade.py", line 142, in doStep
    self.handler(tool)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\plone.app.upgrade-1.0.7-py2.6.egg\plone\app\upgrade\v40\alphas.py", line 443, in migrateFolders
    transaction.savepoint(optimistic=True)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_manager.py", line 99, in savepoint
    return self.get().savepoint(optimistic)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 253, in savepoint
    self._saveAndRaiseCommitishError() # reraises!
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 250, in savepoint
    savepoint = Savepoint(self, optimistic, *self._resources)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 647, in __init__
    savepoint = savepoint()
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 1128, in savepoint
    self._commit(None)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 606, in _commit
    self._store_objects(ObjectWriter(obj), transaction)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 640, in _store_objects
    p = writer.serialize(obj)  # This calls __getstate__ of obj
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\serialize.py", line 422, in serialize
    return self._dump(meta, obj.__getstate__())
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\serialize.py", line 431, in _dump
    self._p.dump(state)
PicklingError: Can't pickle <class 'p4a.calendar.interfaces.ICalendarSupport'>: import of module p4a.calendar.interfaces failed

请注意,这是一次测试运行:它是一个虚假且干净的 Data.fs,唯一涉及的产品是 P4A.Calendar,仅在 3.3.5 构建中安装(并在将 Data.fs 移至 4.0.7 安装之前卸载)。

我还尝试遵循此处的建议< /a>,并且 Plone 对象的 SiteManager 没有任何带有“p4a”字符串的适配器或订阅者。全局 SiteManager 中的 dict 属性也不会报告任何“p4a”字符串的出现。

谁能给我解释一下吗?我应该在 Data.fs 中哪里查找“p4a.calendar.interfaces.ICalendarSupport”?

I am trying to migrate a Plone 3.3.5 installation to 4.0.7.

Before migrating, it was decided that Plone4Artists Calendar should be removed.

We followed the procedures proposed here http://plone.org/documentation/kb/cleaning-p4a, applying it for the following interfaces:

from p4a.calendar.interfaces import ICalendarEnhanced
from p4a.calendar.interfaces import IPossibleCalendar
from p4a.calendar.interfaces import ICalendarConfig
from p4a.calendar.interfaces import IEventProvider
from p4a.calendar.interfaces import IEvent
from p4a.calendar.interfaces import IBasicCalendarSupport
from p4a.calendar.interfaces import ICalendarSupport

Apparently, it works (except for the IPossibleCalendar interface, for which I get a "Can only remove directly provided interfaces." message). In order to remove that, we uninstalled the product (following good advice from here)

Now, after moving the Data.fs from 3.3.5 to the 4.0.7 install, and trying to activate the migration at /Plone/@@plone-upgrade, I get the following traceback:

Traceback (most recent call last):
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\plone-4.0.7-py2.6.egg\Products\CMFPlone\MigrationTool.py", line 175, in upgrade
    step['step'].doStep(setup)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\products.genericsetup-1.6.3-py2.6.egg\Products\GenericSetup\upgrade.py", line 142, in doStep
    self.handler(tool)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\plone.app.upgrade-1.0.7-py2.6.egg\plone\app\upgrade\v40\alphas.py", line 443, in migrateFolders
    transaction.savepoint(optimistic=True)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_manager.py", line 99, in savepoint
    return self.get().savepoint(optimistic)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 253, in savepoint
    self._saveAndRaiseCommitishError() # reraises!
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 250, in savepoint
    savepoint = Savepoint(self, optimistic, *self._resources)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\transaction-1.0.1-py2.6.egg\transaction\_transaction.py", line 647, in __init__
    savepoint = savepoint()
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 1128, in savepoint
    self._commit(None)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 606, in _commit
    self._store_objects(ObjectWriter(obj), transaction)
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\Connection.py", line 640, in _store_objects
    p = writer.serialize(obj)  # This calls __getstate__ of obj
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\serialize.py", line 422, in serialize
    return self._dump(meta, obj.__getstate__())
  File "d:\plone-4.0.7-teste-20110927\buildout-cache\eggs\zodb3-3.9.5-py2.6-win32.egg\ZODB\serialize.py", line 431, in _dump
    self._p.dump(state)
PicklingError: Can't pickle <class 'p4a.calendar.interfaces.ICalendarSupport'>: import of module p4a.calendar.interfaces failed

Please note that this is a test run: it is a bogus and clean Data.fs, and the only product involved is P4A.Calendar, which was installed (and uninstalled before moving the Data.fs to the 4.0.7 install) only at the 3.3.5 buildout.

I also tried to follow the advice from here, and the SiteManager for the Plone object does not have any adapter or subscriber with the "p4a" string. The dict attribute from the global SiteManager does not report any occurrence of the "p4a" string either.

Can anyone give me a light on this? Where should I look for "p4a.calendar.interfaces.ICalendarSupport" in the Data.fs?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文