List Info

Thread: Scripting ZOPE/Plone installation




Scripting ZOPE/Plone installation
user name
2006-09-29 18:30:19
Hi again,

Sorry to be a pain, I'm making significant progress, but
again have  
been hit by a strange error report that means little...

I'm trying to install several products using the  
portal_quickinstaller method, installation of FAQulator,
ATExtensions  
all go in as expected, but CMFBibliographyAT gives the
following  
cryptic error report...

 >>> plone_sites_folder = getattr(app,
'plone_sites')
 >>> cms = plone_sites_folder.cms
 >>> quickinstaller = cms.portal_quickinstaller
 >>> quickinstaller.installProduct('ATExtensions')
 >>>
quickinstaller.installProduct('CMFBibliographyAT')
2006-09-29 19:17:06 ERROR Zope.SiteErrorLog http://foo
Traceback (most recent call last):
   File
"/home/zope/client0/Products/CMFQuickInstallerTool/ 
QuickInstallerTool.py", line 322, in installProduct
     res=install(portal)
   File
"/home/zope/zope-2.8/lib/python/Products/ExternalMethod
/ 
ExternalMethod.py", line 225, in __call__
     try: return f(*args, **kw)
   File
"/home/zope/client3/Products/CMFBibliographyAT/Extensio
ns/ 
Install.py", line 274, in install
     setupTool(self, out)
   File
"/home/zope/client3/Products/CMFBibliographyAT/Extensio
ns/ 
Install.py", line 67, in setupTool
     bibtool.manage_changeProperties({
   File
"/home/zope/zope-2.8/lib/python/OFS/PropertyManager.py&
quot;, line  
317, in manage_changeProperties
     manage_tabs_message=message)
   File
"/home/zope/zope-2.8/lib/python/Shared/DC/Scripts/ 
Bindings.py", line 311, in __call__
     return self._bindAndExec(args, kw, None)
   File
"/home/zope/zope-2.8/lib/python/Shared/DC/Scripts/ 
Bindings.py", line 348, in _bindAndExec
     return self._exec(bound_data, args, kw)
   File
"/home/zope/zope-2.8/lib/python/App/special_dtml.py&quo
t;, line  
175, in _exec
     try: result = render_blocks(self._v_blocks, ns)
KeyError: 'URL1'
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File
"/home/zope/client0/Products/CMFQuickInstallerTool/ 
QuickInstallerTool.py", line 322, in installProduct
     res=install(portal)
   File
"/home/zope/zope-2.8/lib/python/Products/ExternalMethod
/ 
ExternalMethod.py", line 225, in __call__
     try: return f(*args, **kw)
   File
"/home/zope/client3/Products/CMFBibliographyAT/Extensio
ns/ 
Install.py", line 274, in install
     setupTool(self, out)
   File
"/home/zope/client3/Products/CMFBibliographyAT/Extensio
ns/ 
Install.py", line 67, in setupTool
     bibtool.manage_changeProperties({
   File
"/home/zope/zope-2.8/lib/python/OFS/PropertyManager.py&
quot;, line  
317, in manage_changeProperties
     manage_tabs_message=message)
   File
"/home/zope/zope-2.8/lib/python/Shared/DC/Scripts/ 
Bindings.py", line 311, in __call__
     return self._bindAndExec(args, kw, None)
   File
"/home/zope/zope-2.8/lib/python/Shared/DC/Scripts/ 
Bindings.py", line 348, in _bindAndExec
     return self._exec(bound_data, args, kw)
   File
"/home/zope/zope-2.8/lib/python/App/special_dtml.py&quo
t;, line  
175, in _exec
     try: result = render_blocks(self._v_blocks, ns)
KeyError: 'URL1'
 >>>

Any ideas? The above output was from a debug session that
had the  
securityManager setup and 'app=makerequest(app)'

Thanks in advance
-- 
Duncan Mortimer
duncanfmrib.ox.ac.uk




_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup
Scripting ZOPE/Plone installation
user name
2006-10-02 08:23:02
Duncan Mortimer wrote:


>     try: result = render_blocks(self._v_blocks, ns)
> KeyError: 'URL1'
>  >>>
> 
> Any ideas? The above output was from a debug session
that had the  
> securityManager setup and 'app=makerequest(app)'
> 

Not having installed those products, I don't have experience
that can 
help you much. However the error message sounds suspiciously
like its 
expecting stuff to be done through the ZMI.

Cheers
N

-- 
Nick Davis
Web Application Developer
University of Leicester
http://www2.le.ac.uk
http://ebulletin.le.ac.uk


_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup
Scripting ZOPE/Plone installation
user name
2006-10-03 02:02:08
Hey Duncan,

> File
"/home/zope/zope-2.8/lib/python/App/special_dtml.py&quo
t;, line 175, in _exec
> try: result = render_blocks(self._v_blocks, ns)
> KeyError: 'URL1'
> 
> Any ideas? The above output was from a debug session
that had the  
> securityManager setup and 'app=makerequest(app)'

yep, AFAICT the answer looks simple: the fake REQUEST
generated by the
makerequest call isn't functional enough, as URL1 is missing
(or isn't
being auto created due its fakeness...).

You can try to workaround it by explicitly setting URL1...

  app.REQUEST.other['URL1'] = ''

...or even fiddling with app.REQUEST._steps or any other
internal thing
from lib/python/ZPublisher/HTTPRequest.py (but this seems
harder).

BTW, that exception is raised inside render_blocks, which is
defined at
lib/python/DocumentTemplate/cDocumentTemplate.c, IOW C code,
that's why
the traceback isn't very useful... 

HTH,

-- 
 ___________________________________________________________
________

       Dorneles Treméa · Developer · Plone Solutions ·
Brazil

   Consulting · Training · Development · http://plonesolutions.com
 ___________________________________________________________
________

  Plone Foundation · http://plone.org/foundati
on · Protecting Plone


_______________________________________________
Setup mailing list
Setuplists.plone.org
http://
lists.plone.org/mailman/listinfo/setup
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )