首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >mr.migrator: wordpress2plone AttributeError: Context实例没有属性“getPhysicalPath”

mr.migrator: wordpress2plone AttributeError: Context实例没有属性“getPhysicalPath”
EN

Stack Overflow用户
提问于 2013-07-01 11:39:48
回答 1查看 261关注 0票数 1

我从https://github.com/aclark4life/wordpress2plone/的配置文件中借用了一些想法来扩展plone4.3构建。

目的是为了能够将从wordpress站点导出的数据导入到我的Plone站点中。导出的格式是Wordpress eXtended RSS (wxr)。

当我运行以下迁移命令时,

bin/migrate --管道=管道.bin

我得到以下错误:

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

以下是完整的回溯:

代码语言:javascript
复制
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实例,我想知道我的Plone站点的位置是否有什么我没有声明过的,似乎出于某种原因,transmogrifier.context没有被设置到我的Plone站点。

要进一步参考pipeline.cfg文件中的选项,如下所示:

代码语言:javascript
复制
[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
EN

回答 1

Stack Overflow用户

发布于 2013-07-15 07:00:29

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17403634

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档