Plone 4.3 빌드 아웃을 확장하기 위해 https://github.com/aclark4life/wordpress2plone/의 구성 파일에서 아이디어를 빌 렸습니다.mr.migrator : wordpress2plone AttributeError : 컨텍스트 인스턴스에 'getPhysicalPath'속성이 없습니다.
의도는 Wordpress 사이트에서 내 Plone 사이트로 내 보낸 데이터를 가져올 수 있도록하는 것입니다. 내 보낸 형식은 Wordpress eXtended RSS (wxr)입니다.
나는 다음과 같은 이주 명령을 실행
는bin/migrate --pipeline=pipeline.cfg
나는 다음과 같은 오류 얻을 :
이AttributeError: Context instance has no attribute '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 인스턴스를 찾지 못했고 내가 locati에 대해 선언하지 않은 것이 있는지 궁금합니다. 내 Plone 사이트에서 어떤 이유로 인해 transmogrifier.context가 Plone 사이트로 설정되지 않은 것으로 보입니다. "플론 (Plone)을"가정
이[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
그래서 "Plone"이라고 가정합니다. "Plone"이 이드가 아니라면? (나는이 시점에서 코드를 읽어야한다. :)). –
:) 사실, 사실, sitename도 포함해야합니다. updatet 대답. Alex Clark의 예를 간단히 살펴 보았습니다.이 예제는 경로로 '/'를 인용합니다. '/ Plone'으로 해봤습니까? 나도이 스크립트를 우연히 만난다. https://github.com/zedr/wordpress2plone/blob/master/wp2plone.py –
이 mr.migrator 기반 스크립트가 작동되기를 원할 것이다. 그동안 나는 zedr과 aclark로부터 아이디어를 얻었고 그것들을 조합하여 WXR 수입업자의 자체 버전을 만들었습니다. https://github.com/collective/wordpress2plone –