Migration mr.migrator:WordPress2Clone AttributeError:Context实例没有属性';getPhysicalPath';

Migration mr.migrator:WordPress2Clone AttributeError:Context实例没有属性';getPhysicalPath';,migration,plone,transmogrifier,Migration,Plone,Transmogrifier,我从上的配置文件中借用了一些想法来扩展我的Plone 4.3构建 这样做的目的是将从wordpress站点导出的数据导入我的Plone站点。导出的格式为Wordpress扩展RSS(wxr) 当我运行以下迁移命令时 bin/migrate--pipeline=pipeline.cfg 我得到以下错误: AttributeError:上下文实例没有属性“getPhysicalPath” 以下是完整的回溯: Traceback (most recent call last): File "bin

我从上的配置文件中借用了一些想法来扩展我的Plone 4.3构建

这样做的目的是将从wordpress站点导出的数据导入我的Plone站点。导出的格式为Wordpress扩展RSS(wxr)

当我运行以下迁移命令时

bin/migrate--pipeline=pipeline.cfg

我得到以下错误:

AttributeError:上下文实例没有属性“getPhysicalPath”

以下是完整的回溯:

Traceback (most recent call last):
  File "bin/migrate", line 293, in <module>
    sys.exit(mr.migrator.runner.runner())
  File "/home/zope/Plone/buildout-cache/eggs/mr.migrator-1.0.1-py2.7.egg/mr/migrator/runner/__init__.py", line 132, in runner
    transmogrifier(pipelineid, **overrides)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/transmogrifier.py", line 59, in __call__
    pipeline = constructPipeline(self, sections)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/utils.py", line 56, in constructPipeline
    pipeline)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/sections/splitter.py", line 132, in __init__
    pipeline = constructPipeline(transmogrifier, sections, condition)
  File "/home/zope/Plone/buildout-cache/eggs/collective.transmogrifier-1.4-py2.7.egg/collective/transmogrifier/utils.py", line 56, in constructPipeline
    pipeline)
  File "/home/zope/Plone/side/src/transmogrify.wordpress/transmogrify/wordpress/blueprints.py", line 300, in __init__
    self.site_path = '/'.join(transmogrifier.context.getPhysicalPath())
AttributeError: Context instance has no attribute 'getPhysicalPath'

假设“Plone”是您的Plonesite的Id,将路径更改为
/Plone

,使其假定Id为“Plone”?如果“Plone”不是id呢?(我现在真的应该去读代码:)。:)真的,真的,也应该包含sitename,updatet-answer。我们快速看了一下Alex Clark的示例,其中引用“/”作为路径。你试过“/Plone”吗?我也无意中发现了这个脚本,它看起来很有希望:我希望这个基于migrator先生的脚本能够正常工作。同时,我从zedr和aclark那里获得了一些想法,并将它们结合起来创建了我自己的WXR导入器版本@戴维宾:很好,你找到了另一个解决方案,放弃一个问题不是。你只需要改变道路,看看会发生什么,并与我们分享结果,作为向试图帮助你解决问题的人争取时间的回报,也许。此外,这项任务的兴趣很低(谁投了赞成票,为什么?),这表明研究很差,而且可能会被关闭。艾达,你是对的,我的动机有点低,但我确实想让mr.migrator方法发挥作用,因为这是我的首选方法。如果你看看我在stackoverflow上问过的问题的历史,有时我直到几个月后才找到解决方案,除非我真的认为这是合适的解决方案,否则我不想接受答案。我用其他路径进行了测试,到目前为止还没有任何有效的方法。
[options]

#Full path to the Wordpress WXR export file.
filename = /home/zope/Plone/side/myblog.wordpress.2013-06-29.xml

#Path, relative to the site root, of the folder where blog entries
#should be created.
#path = blog
path = Plone

#The desired portal_type for blog entries.  Must be something with
#a 'text' field, and must already exist in the site.  The default,
#'Blog Entry', may be obtained by installing Scrawl.
#type = Blog Entry
type = Page

#A CSS selector to find the body of a post within its full HTML page.
entry-selector = div.entry