【发布时间】:2012-01-23 02:57:47
【问题描述】:
我已经使用 buildout 从 4.0.5 升级到 4.1.3,但是当我尝试升级(第一次登录)时,我得到了这个:
... ERROR plone.app.upgrade Upgrade aborted. Error:
Traceback (most recent call last):
File "/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-4.1.3-py2.6.egg/Products/CMFPlone/MigrationTool.py", line 175, in upgrade
step['step'].doStep(setup)
File "/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/upgrade.py", line 140, in doStep
self.handler(tool)
File "/usr/local/Plone/buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v41/alphas.py", line 105, in add_siteadmin_role
for permission_id, roles in state.permission_roles.items():
AttributeError: 'NoneType' object has no attribute 'items'
...ERROR plone.app.upgrade Migration has failed
升级步骤:
Current
4018
Latest
4112
(4018 → 4019)
* No upgrade steps
(4019 → 4020)
* No upgrade steps
(4020 → 4022)
* No upgrade steps
(4022 → 4100)
* Add Site Administrator role
* Update role mappings
* Update control panel permissions
* Install plone.outputfilters
* Miscellaneous
(4100 → 4101)
* Miscellaneous
(4101 → 4102)
* Miscellaneous
(4102 → 4103)
* Miscellaneous
(4103 → 4104)
* Miscellaneous
(4104 → 4105)
* Miscellaneous
(4105 → 4106)
* Miscellaneous
(4106 → 4107)
* Miscellaneous
(4107 → 4108)
* Miscellaneous
(4108 → 4109)
* Miscellaneous
(4109 → 4110)
* Fix OkapiIndex total document lengths
(4110 → 4111)
* Repair owner tuples
* Miscellaneous
(4111 → 4112)
* Miscellaneous
万海姆: 我通过添加
尝试了第二种解决方案 if state.permission_roles is None:
continue
到
../buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v41/alphas.py
我不知道它是否有问题,但有几个 alphas.py:
[root@www /usr/local/Plone]# find . -type f -name 'alphas.py' ./buildout-cache/eggs/plone.app.upgrade-1.0.5-py2.6.egg/plone/app/upgrade/v30/alphas.py ./buildout-cache/eggs/plone.app.upgrade-1.0.5-py2.6.egg/plone/app/upgrade/v40/alphas.py ./buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v30/alphas.py ./buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v40/alphas.py ./buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v41/alphas.py
无论如何,然后我进行了迁移,它变得更好了 - 但我在下面遇到了这个新错误:
导入的角色/权限映射。 步骤collective.blogging.reset-layers 具有无效的导入处理程序 未找到工具 portal_pbnotification 的类 Products.PloneboardSubscription.NotificationTool.NotificationTool 升级中止。错误: 回溯(最近一次通话最后): 升级中的文件“/usr/local/Plone/buildout-cache/eggs/Products.CMFPlone-4.1.3-py2.6.egg/Products/CMFPlone/MigrationTool.py”,第 175 行 step['step'].doStep(设置) 文件“/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/upgrade.py”,第 140 行,在 doStep self.handler(工具) 文件“/usr/local/Plone/buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/v41/betas.py”,第 112 行,在 to41beta2 loadMigrationProfile(上下文,'profile-plone.app.upgrade.v41:to41beta2') 文件“/usr/local/Plone/buildout-cache/eggs/plone.app.upgrade-1.1.4-py2.6.egg/plone/app/upgrade/utils.py”,第 112 行,在 loadMigrationProfile context.runAllImportStepsFromProfile(profile, purge_old=False) 文件“/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/tool.py”,第 323 行,在 runAllImportStepsFromProfile 忽略依赖=忽略依赖) _runImportStepsFromContext 中的文件“/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/tool.py”,第 1084 行 消息 = self._doRunImportStep(步骤,上下文) _doRunImportStep 中的文件“/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/tool.py”,第 998 行 返回处理程序(上下文) 文件“/usr/local/Plone/buildout-cache/eggs/Products.GenericSetup-1.6.4-py2.6.egg/Products/GenericSetup/tool.py”,第 123 行,在 importToolset new_tool = tool_class(tool_id) TypeError:“NoneType”对象不可调用 升级路径结束,迁移已完成 升级路径未达到当前版本 迁移失败 结束
NB 在升级之前我从插件中删除了 Products.PloneboardSubscription 并进行了卸载。很久以前我也删除了collective.blogging。尝试迁移时,不知何故仍然有一些引用:
存在未解决的或循环的依赖关系。 Graphviz 图:: 有向图依赖 {"typeinfo" -> "toolset"; “tinymce_settings”->“组件注册表”; “kss_mimetype”->“mimetypes-registry-various”; “collective.blogging.reset-roles”;“atcttool”->“目录”; “atcttool”->“组件注册表”; “动作”->“组件注册表”; “皮肤”->“组件注册表”; “语言工具”->“工具集”; “工厂工具”->“组件注册表”; “工厂工具”->“类型信息”; “ploneboard-各种”->“工具集”; “ploneboard-various”->“typeinfo”; “ploneboard-various”->“placeful_workflow”; “placeful_workflow”->“typeinfo”; “placeful_workflow”->“工作流”; “portal-transforms-various”->“componentregistry”; “组件注册表”->“工具集”; “plone.app.caching”;“控制面板”->“动作”; “控制面板”->“组件注册表”; “placeful_marker”->“工作流程”; “jsregistry”->“工具集”; “jsregistry”->“组件注册表”; “动作图标”->“组件注册表”; “plone.app.registry”->“组件注册表”; “plone.app.registry”->“工具集”; “mimetypes-registry-various”->“componentregistry”; “reference_catalog”->“工具集”; “viewlets”->“componentregistry”; “内容”->“类型信息”; “collective.blogging.reset-catalog”;“propertiestool”->“componentregistry”; “各种”->“工具集”; “collective.blogging.reset-views”;“portlets”->“componentregistry”; “portlets”->“内容”; “content_type_registry”->“组件注册表”; “plone-final”->“kss_mimetype”; “plone-final”->“portlets”; “plone-final”->“角色映射”; “kssregistry”->“工具集”; “kssregistry”->“组件注册表”; “poi_various”->“目录”; “ploneopenid-various”;“更新工作流程角色映射”->“工作流程”; “共享”->“角色映射”; “uid_catalog”->“工具集”; “工作流程”->“工具集”; “collective.plonetruegallery.install”;“cssregistry”->“工具集”; “cssregistry”->“组件注册表”; “内容规则”->“组件注册表”; “内容规则”->“内容”; “目录”->“工具集”; “简单附件”->“属性”; “简单附件”->“类型信息”; “cookie_authentication”->“工具集”; “cmfeditions_various”->“工具集”; “cmfeditions_various”->“typeinfo”; “差异工具”->“工具集”; “difftool”->“组件注册表”; “plone-content”->“plone-final”; “工具集”;“属性”;“collective.blogging.reset-layers”;“plonepas”->“组件注册表”; “plonepas”->“控制面板”; “plonepas”->“成员数据属性”; “plonepas”->“plonepas-内容”; “plonepas”->“角色映射”; “jquerytools-各种”->“cssregistry”; “tinymce_various”->“组件注册表”; “浏览器层”->“组件注册表”; “plone-difftool”;“plone_outputfilters_various”->“组件注册表”; “成员数据属性”->“组件注册表”; "Products.EasyNewsletter-setuphandlers";"plonetheme.sunburst-various" -> "actions"; “caching_policy_mgr”->“工具集”; “原型工具”->“原型-各种”; “邮件主机”->“组件注册表”; “存储库工具”->“工具集”; “存储库工具”->“类型信息”; “存储库工具”->“cmfeditions_various”; “Products.Ploneboard.uninstallVarious”;“各种日历”->“工具集”; “collective.flowplayer”->“kupu-setup”; “collective.flowplayer”->“propertiestool”; “kupu-setup”->“工具集”; “kupu-setup”->“typeinfo”; “原型-各种”->“组件注册表”; “角色映射”;“plonepas”[颜色=红色,样式=填充]; }
谢谢。 尼古拉·G.
【问题讨论】: