2012-08-29 67 views
1

我在我的plone網站上集成了collective.documenviewer。這用於在線查看PDF和其他辦公文件。Plone/Python:在Ubuntu上使用Plone的zc.async問題

其中一個可選的附加產品是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問題?

UPDATE:下面是我的擴建

[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 

回答

1

如果plone.app.async隊列尚未建立這會發生。 plone.app.async & zc.async有(過)複雜,實際上需要你閱讀README;)

你應該看看他們的pypi頁面提供plone.app.async的指示,特別是構建配置。 除非你包含必要的zcml(對於你的「普通」,以及你的「工人」實例),否則你的隊列將不會被設置。

+0

看着回溯,他只是試圖與collective.documentviewer集成。他不應該閱讀文檔實際上是使用異步隊列 - 只需設置它。 – vangheem

+0

@vangheem設置zc.queues不應該由插件完成,如果你這樣做,你應該改變它。這是由zcml故意發生的。 – ggozad

-1

這看起來像一個與collective.documentviewer問題。我是作者,實際上我認爲我在某個時候解決了這個問題。你正在運行什麼版本?

+0

collective.documentviewer的版本是2.2a1 – Frankline

+0

只需添加,我已經按照類似於此的構建配置:http://svn.plone.org/svn/plone/plone.app.async/trunk/buildout-plone4- single-db.cfg – Frankline

+0

這很奇怪。我在沒有問題的情況下在非常大的網站上使用這些版本。有些東西可能沒有正確設置。我認爲這個關鍵錯誤是因爲它無法在根對象上找到異步隊列存儲 - 這不應該發生。 – vangheem