Silva doesn't display images on Zope 2.10.9 on Solaris

Asked by ashre on 2009-09-21

Following on from failing to get Silva running on Zope 2.11 we rolled back to 2.10.9 - we also have PIL installed (and Silva sees it) but when I create a page with an image on it I see an error page and this in the error_log:

Time 2009/09/21 12:01:19.288 GMT+1
User Name (User Id) Anonymous User (None)
Request URL http://wtest.ion.ucl.ac.uk/@@index.html
Exception Type AttributeError
Exception Value get_container
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Products.SilvaLayout.browser.silvalegacy.legacyview, line 17, in __call__
  Module Products.SilvaLayout.browser.silvalegacy.legacyview, line 12, in lookup_and_call
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.Hotfix_20080812, line 154, in _exec
  Module None, line 17, in index_html
   - <PythonScript at /ion/index_html>
   - Line 17
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
  Module Products.PageTemplates.ZopePageTemplate, line 427, in pt_render
  Module Products.PageTemplates.PageTemplate, line 98, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 891, in do_useMacro
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 957, in do_defineSlot
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 536, in do_optTag_tal
  Module zope.tal.talinterpreter, line 521, in do_optTag
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 223, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: /ion/layout_macro.html
   - Line 125, Column 0
   - Expression: <PythonExpr getattr(here, view_method)()>
   - Names:
      {'container': <Silva Root instance ion>,
       'context': <Silva Root instance ion>,
       'default': <object object at 0x5c528>,
       'here': <Silva Root instance ion>,
       'loop': {},
       'nothing': None,
       'options': {'args': (), 'view_method': 'view'},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x2f44710>,
       'request': <HTTPRequest, URL=http://wtest.ion.ucl.ac.uk/@@index.html>,
       'root': <Application at >,
       'template': <ZopePageTemplate at /ion/content.html>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: getattr(here, view_method)()
  Module PythonExpr, line 1, in <expression>
  Module Products.Silva.SilvaObject, line 342, in view
  Module Products.Silva.SilvaObject, line 366, in view_version
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 8, in render
   - <FSPythonScript at /ion/service_views/Silva/public/Folder/view/render>
   - Line 8
  Module Products.Silva.VersionedContent, line 238, in view
  Module Products.Silva.SilvaObject, line 342, in view
  Module Products.Silva.SilvaObject, line 366, in view_version
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 4, in render
   - <FSPythonScript at /ion/service_views/SilvaDocument/public/Document/view/render>
   - Line 4
  Module Products.XMLWidgets.EditorService, line 325, in renderView
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPageTemplate, line 195, in _exec
  Module Products.FileSystemSite.FSPageTemplate, line 134, in pt_render
  Module Products.PageTemplates.PageTemplate, line 98, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 534, in do_optTag_tal
  Module zope.tal.talinterpreter, line 516, in no_tag
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
  Module Products.PageTemplates.Expressions, line 223, in evaluateStructure
  Module zope.tales.tales, line 696, in evaluate
   - URL: file:SilvaDocument/widgets/top/doc/mode_view/render.pt
   - Line 8, Column 0
   - Expression: <PythonExpr container.service_editor.renderElementsView(request.node)>
   - Names:
      {'container': <DirectoryViewSurrogate at /ion/service_widgets/top/doc/mode_view>,
       'context': <DirectoryViewSurrogate at /ion/service_widgets/top/doc/mode_view>,
       'default': <object object at 0x5c528>,
       'here': <DirectoryViewSurrogate at /ion/service_widgets/top/doc/mode_view>,
       'loop': {},
       'nothing': None,
       'options': {'args': ()},
       'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x3041620>,
       'request': <HTTPRequest, URL=http://wtest.ion.ucl.ac.uk/@@index.html>,
       'root': <Application at >,
       'template': <FSPageTemplate at /ion/service_widgets/top/doc/mode_view/render>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>}
  Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__: container.service_editor.renderElementsView(request.node)
  Module PythonExpr, line 1, in <expression>
  Module Products.XMLWidgets.EditorService, line 332, in renderElementsView
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 1, in render
   - <FSPythonScript at /ion/service_widgets/element/doc_elements/image/mode_view/render>
   - Line 1
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 5, in tag
   - <FSPythonScript at /ion/service_widgets/element/doc_elements/image/tag used for /ion/service_widgets/element/doc_elements/image/mode_view>
   - Line 5
  Module Products.FileSystemSite.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.FileSystemSite.FSPythonScript, line 164, in _exec
  Module None, line 3, in content
   - <FSPythonScript at /ion/service_widgets/element/doc_elements/image/content used for /ion/service_widgets/element/doc_elements/image/mode_view>
   - Line 3
AttributeError: get_container

Does anyone have any idea what might be causing that?

Question information

Language:
English Edit question
Status:
Solved
For:
Silva Edit question
Assignee:
No assignee Edit question
Solved by:
Wim Boucquaert
Solved:
2009-09-21
Last query:
2009-09-21
Last reply:
2009-09-21

Hi,

Could you try using Zope 2.11.2. That should work fine.

ashre wrote:
> New question #83406 on Silva:
> https://answers.launchpad.net/silva/+question/83406
>
> Following on from failing to get Silva running on Zope 2.11 we rolled back to 2.10.9 - we also have PIL installed (and Silva sees it) but when I create a page with an image on it I see an error page and this in the error_log:
>

Regards

Wim

Kit Blake (kitblake) said : #2

That get_container error looks suspiciously like the problem with Zope 2.11.4. Stupid question: are you sure that's Zope 2.10.9?

ashre (ashre) said : #3

Thanks, we will try 2.11.2 - we are definitely using 2.10.9 but we are using a Data.fs from the old 2.11.4 install so we're going to try creating a new zope instance and silva root first in case that's the problem. Then we'll try 2.11.2 and let you know if either of those fix the problem.

matt_ion (m-moore) said : #4

(I'm the sysadmin for the site in question):

(Zope 2.10.9-final, python 2.4.4, sunos5)
Python Version 2.4.4 (#1, Jan 10 2007, 01:25:01) [C]
System Platform sunos5

with recommended Hotfix_20080812 applied.

ashre (ashre) said : #5

Ok it works fine with Zope 2.11.2 and with 2.10.6 but not with 2.11.4 or 2.10.9 so something from the edge of 2.11 must have been backported to the 2.10 branch which has broken Silva support.

To reiterate if you want to run Silva 2.1 use Zope 2.10.6 or 2.11.2

Thanks

ashre (ashre) said : #6

Thanks Wim Boucquaert, that solved my question.