1

我在我的克隆网站上集成了collective.documenviewer。这用于在线查看 PDF 和其他办公文件。

可选的附加产品之一是 plone.app.async,它又使用 zc.async。现在,安装顺利,没有错误。但是当我保存文件时,会产生一个我无法弄清楚的错误:以下是错误:

2012-08-29T12:52:03 ERROR collective.documentviewer Error using plone.app.async with collective.documentviewer. Converting pdf without plone.app.async...
Traceback (most recent call last):
File "/home/frank/apps/myplonesite/plone/eggs/collective.documentviewer-2.2a1-py2.7.egg/collective/documentviewer/async.py", line 143, in queueJob
runner = JobRunner(object)
File "/home/frank/apps/myplonesite/plone/eggs/collective.documentviewer-2.2a1-py2.7.egg/collective/documentviewer/async.py", line 50, in __init__
self.queue = self.async.getQueues()['']
File "/home/frank/apps/myplonesite/plone/eggs/plone.app.async-1.2-py2.7.egg/plone/app/async/service.py", line 100, in getQueues
return self._conn.root()[KEY]
File "/home/frank/apps/myplonesite/plone/../../python27/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'zc.async'

这些是我正在使用的版本:

plone.app.async = 1.2
zc.async = 1.5.4

我该如何解决这个KeyError问题?

更新:下面是我的扩建

[buildout]
newest = false
allow-picked-versions = false 
index = http://dist.candid.org/candid
extends =
    versions.cfg      

parts =
    lxml
    svneggs
    svnproducts
    zeo
    instance
    worker
    paster
    plonesite        

versions = versions

find-links =
    http://dist.candid.org/candid

develop =
      ../src/candid.main
      ../src/ploned.ui
      ../src/z3c.traverser
      ../src/repoze.whooze
      ../src/marginalia
      ../src/ore.alchemist
      ../src/alchemist.ui
      ../src/alchemist.catalyst
      ../src/alchemist.traversal
      ../src/alchemist.security
      ../src/portal.auth


eggs =
    Plone
    Products.PloneHelpCenter
    Products.LinguaPlone
    candid
    alchemist.ui
    alchemist.catalyst
    alchemist.traversal
    alchemist.security
    ploned.ui
    candidcms.plonepas
    candidcms.policy 
    candidcms.theme
    psycopg2
    Products.Scrawl
    collective.contacts
    collective.tabr
    candidcms.workspaces
    lotr.repository
    archetypes.multifile
    Products.ATVocabularyManager
    collective.dynatree
    collective.portlet.explore
    z3c.json
    collective.js.jqueryui            
    python-cjson
    collective.plonetruegallery 
    lotr.templates
    portal.auth
    Products.PloneFormGen
    quintagroup.pfg.captcha
    collective.documentviewer
    five.intid
    plone.app.async



zcml = 
    candidcms.plonepas
    candidcms.policy
    candidcms.theme
    candid.portal
    candidcms.workspaces
    archetypes.multifile
    lotr.templates
    collective.contacts
    collective.tabr
    collective.portlet.explore    


[instance]
recipe = plone.recipe.zope2instance
user = uadmin:uadmin
eggs =
    ${buildout:eggs}
    Products.CMFPlone 
    Paste
    PasteScript
    PasteDeploy
    repoze.tm2
    repoze.retry
    repoze.who


zcml =
    ${buildout:zcml} 

zcml-additional =
    <include package="plone.app.async" file="single_db_instance.zcml" />
environment-vars =
    ZC_ASYNC_UUID ${buildout:directory}/var/instance-uuid.txt

products = 
    ${svnproducts:location}

# !+XAPIAN PATH(mn, apr-2012) hardcoded path to candid xapian installation
# temporary fix because plone uses the 'candid.portal' package which is in the
# candid.main package. Once the candid.portal package is factored out this entry
# should be removed.
extra-paths = 
  ../parts/xapian/lib/python


[lxml]
recipe = z3c.recipe.staticlxml
egg = lxml
force = false
build-libxslt = true
build-libxml2 = true
libxslt-url = http://candid-portal.googlecode.com/files/libxslt-1.1.24.tar.gz
libxml2-url = http://candid-portal.googlecode.com/files/libxml2-2.6.32.tar.gz

[svnproducts]
recipe = infrae.subversion
urls =
    http://candid-portal.googlecode.com/svn/plone.products/CandidHelpCenter/branches/plone4 CandidHelpCenter


[svneggs]
recipe = infrae.subversion
as_eggs = true
urls =
    http://candid-portal.googlecode.com/svn/plone.products/candidcms.plonepas/trunk/ candidcms.plonepas
    http://candid-portal.googlecode.com/svn/plone.products/candidcms.policy/trunk/  candidcms.policy
    http://candid-portal.googlecode.com/svn/plone.products/candidcms.theme/trunk/ candidcms.theme
    http://candid-portal.googlecode.com/svn/plone.products/candidcms.workspaces/trunk/ candidcms.workspaces  
    http://lotr.googlecode.com/svn/lab/apps/lotr.repository/ lotr.repository
    http://lotr.googlecode.com/svn/trunk/products/lotr.templates/ lotr.templates    

[paster]
recipe = zc.recipe.egg
eggs = ${instance:eggs}
# !+XAPIAN PATH(mn, apr-2012) hardcoded path to candid xapian installation
extra-paths =
  ../parts/xapian/lib/python
scripts = paster

[zeo]
recipe = plone.recipe.zeoserver
file-storage = ${buildout:directory}/var/filestorage/Data.fs
blob-storage = ${buildout:directory}/var/blobstorage
eggs = ${instance:eggs}

[worker]
recipe = plone.recipe.zope2instance
user = ${instance:user}
eggs = ${instance:eggs}
zcml = ${instance:zcml}
zserver-threads = 2
debug-mode = on
verbose-security = on
zeo-client = true
blob-storage = ${zeo:blob-storage}
shared-blob = on
eggs = ${instance:eggs}
zcml-additional =
    <include package="plone.app.async" file="single_db_worker.zcml" />
environment-vars =
    ZC_ASYNC_UUID ${buildout:directory}/var/worker-uuid.txt

[plonesite]
recipe = collective.recipe.plonesite
site-id = plone
admin-user = uadmin
instance = instance
profiles-initial = 
    Products.CMFPlone:dependencies
    Products.CMFPlone:plone-content
    lotr.repository:default
    candidcms.policy:default
    candidcms.theme:default
    collective.dynatree:default
    candidcms.workspaces:default
    lotr.templates:default
    Products.FacultyStaffDirectory:default
    Products.PlonePopoll:default
    Products.PloneFormGen:default
    quintagroup.pfg.captcha:default
    collective.documentviewer:default
products-initial =
    Products.CMFPlone
    archetypes.multifile
    candidHelpCenter
    LinguaPlone
    collective.plonetruegallery
    collective.tabr
    Products.PloneFormGen
    quintagroup.pfg.captcha
4

2 回答 2

1

如果 plone.app.async 的队列尚未设置,则会发生这种情况。plone.app.async 和 zc.async (过度)复杂,实际上确实需要您阅读自述文件;)

您应该在他们的pypi页面上查看 plone.app.async 提供的说明,特别是构建配置。除非您包含必要的 zcml(对于您的“正常”以及您的“工作”实例),否则您的队列将不会被设置。

于 2012-08-29T18:59:00.950 回答
-1

这看起来像是collective.documentviewer 的问题。我是作者,实际上我认为我在某个时候解决了这个问题。你运行的是什么版本?

于 2012-08-30T04:35:55.070 回答