collective / plonetheme.business_casual

A theme for Plone 5
MIT License
7 stars 4 forks source link

Error handling subrequest to /slider-images/@@slider-images #6

Open macagua opened 1 year ago

macagua commented 1 year ago

When I install plonetheme.business_casual via Add-ons control panel on Plone 5.2.11 and Python 3.8.16, it show the following error:

2023-02-17 13:07:54,907 ERROR   [plone.subrequest:38][waitress-1] Error handling subrequest to /slider-images/@@slider-images
Traceback (most recent call last):
  File "/home/macagua/.buildout/eggs/cp38/Chameleon-3.10.2-py3.8-linux-x86_64.egg/chameleon/template.py", line 192, in render
    self._render(stream, econtext, rcontext)
  File "/home/macagua/proyectos/training/buildout/var/cache/2250523e3e14e799c1bf7a846e055e28.py", line 155, in render
    __iterator = _static_139986245700480('path', 'context/keys', econtext=econtext)(_static_139986245700288(econtext, __zt_tmp))
  File "/home/macagua/.buildout/eggs/cp38/zope.tales-5.2-py3.8.egg/zope/tales/expressions.py", line 250, in __call__
    return self._eval(econtext)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/PageTemplates/Expressions.py", line 217, in _eval
    ob = self._subexprs[-1](econtext)
  File "/home/macagua/.buildout/eggs/cp38/zope.tales-5.2-py3.8.egg/zope/tales/expressions.py", line 153, in _eval
    ob = self._traverser(ob, element, econtext)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/PageTemplates/Expressions.py", line 133, in trustedBoboAwareZopeTraverse
    object = traversePathElement(object, name, path_items,
  File "/home/macagua/.buildout/eggs/cp38/zope.traversing-4.4.1-py3.8.egg/zope/traversing/adapters.py", line 156, in traversePathElement
    return traversable.traverse(nm, further_path)
  File "/home/macagua/.buildout/eggs/cp38/zope.traversing-4.4.1-py3.8.egg/zope/traversing/adapters.py", line 61, in traverse
    raise LocationError(subject, name)
zope.location.interfaces.LocationError: (<Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b460>, 'keys')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/macagua/.buildout/eggs/cp38/plone.subrequest-1.9.3-py3.8.egg/plone/subrequest/__init__.py", line 154, in subrequest
    result = mapply(
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/ZPublisher/mapply.py", line 87, in mapply
    return object(*args)
  File "/home/macagua/.buildout/eggs/cp38/zope.browserpage-4.4.0-py3.8.egg/zope/browserpage/simpleviewclass.py", line 41, in __call__
    return self.index(*args, **kw)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/Five/browser/pagetemplatefile.py", line 126, in __call__
    return self.__func__(__self__, *args, **kw)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/Five/browser/pagetemplatefile.py", line 58, in __call__
    s = self.pt_render(
  File "/home/macagua/.buildout/eggs/cp38/zope.pagetemplate-4.6.0-py3.8.egg/zope/pagetemplate/pagetemplate.py", line 133, in pt_render
    return self._v_program(
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/PageTemplates/engine.py", line 378, in __call__
    return template.render(**kwargs)
  File "/home/macagua/.buildout/eggs/cp38/z3c.pt-3.3.1-py3.8.egg/z3c/pt/pagetemplate.py", line 176, in render
    return base_renderer(**context)
  File "/home/macagua/.buildout/eggs/cp38/Chameleon-3.10.2-py3.8-linux-x86_64.egg/chameleon/zpt/template.py", line 302, in render
    return super(PageTemplate, self).render(**_kw)
  File "/home/macagua/.buildout/eggs/cp38/Chameleon-3.10.2-py3.8-linux-x86_64.egg/chameleon/template.py", line 215, in render
    raise_with_traceback(exc, tb)
  File "/home/macagua/.buildout/eggs/cp38/Chameleon-3.10.2-py3.8-linux-x86_64.egg/chameleon/utils.py", line 53, in raise_with_traceback
    raise exc
  File "/home/macagua/.buildout/eggs/cp38/Chameleon-3.10.2-py3.8-linux-x86_64.egg/chameleon/template.py", line 192, in render
    self._render(stream, econtext, rcontext)
  File "/home/macagua/proyectos/training/buildout/var/cache/2250523e3e14e799c1bf7a846e055e28.py", line 155, in render
    __iterator = _static_139986245700480('path', 'context/keys', econtext=econtext)(_static_139986245700288(econtext, __zt_tmp))
  File "/home/macagua/.buildout/eggs/cp38/zope.tales-5.2-py3.8.egg/zope/tales/expressions.py", line 250, in __call__
    return self._eval(econtext)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/PageTemplates/Expressions.py", line 217, in _eval
    ob = self._subexprs[-1](econtext)
  File "/home/macagua/.buildout/eggs/cp38/zope.tales-5.2-py3.8.egg/zope/tales/expressions.py", line 153, in _eval
    ob = self._traverser(ob, element, econtext)
  File "/home/macagua/.buildout/eggs/cp38/Zope-4.8.7-py3.8.egg/Products/PageTemplates/Expressions.py", line 133, in trustedBoboAwareZopeTraverse
    object = traversePathElement(object, name, path_items,
  File "/home/macagua/.buildout/eggs/cp38/zope.traversing-4.4.1-py3.8.egg/zope/traversing/adapters.py", line 156, in traversePathElement
    return traversable.traverse(nm, further_path)
  File "/home/macagua/.buildout/eggs/cp38/zope.traversing-4.4.1-py3.8.egg/zope/traversing/adapters.py", line 61, in traverse
    raise LocationError(subject, name)
zope.location.interfaces.LocationError: zope.location.interfaces.LocationError: (<Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b460>, 'keys')

 - Expression: "context/keys"
 - Filename:   ... /plonetheme/business_casual/theme/views/slider-images.pt
 - Location:   (line 7: col 36)
 - Source:     <li tal:repeat="item context/keys"
                                    ^^^^^^^^^^^^
 - Arguments:  template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7f510c10f400>
               options: {}
               args: ()
               nothing: None
               modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7f511ab2b3d0>
               request: <WSGIRequest, URL=http://localhost:8080/Plone2/slider-images/@@slider-images>
               view: <Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b130>
               context: <Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b460>
               views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7f50ffe2db20>
               here: <Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b460>
               container: <Products.Five.browser.metaconfigure.SimpleViewClass from /home/macagua/proyectos/training/buildout/src/plonetheme.business_casual/src/plonetheme/business_casual/theme/views/slider-images.pt object at 0x7f5117d7b460>
               root: <Application at >
               traverse_subpath: []
               user: <PropertiedUser 'admin'>
               default: <DEFAULT>
               repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7f510f857880>
               loop: {}
               target_language: None
               translate: <function BaseTemplate.render.<locals>.translate at 0x7f510c13adc0>
               attrs: {'data-target': '#carousel-example-generic', 'data-slide-to': '${python:repeat.item.index}', 'class': "${python: repeat.item.start and 'active' or ''}"}
[18] > /home/macagua/.buildout/eggs/cp38/zope.traversing-4.4.1-py3.8.egg/zope/traversing/adapters.py(61)traverse()
-> raise LocationError(subject, name)
(Pdb++) h

Undocumented commands:
======================
f  frame  hf_list  inspect  paste  put  source

(Pdb++) l
 56             if hasattr(subject, '__getitem__'):
 57                 try:
 58                     return subject[name]
 59                 except (KeyError, TypeError):
 60                     pass
 61  ->         raise LocationError(subject, name)
 62     
 63     
 64     @zope.interface.implementer(ITraverser)
 65     class Traverser(object):
 66         """
(Pdb++) 

Any idea how fixed it? @tkimnguyen @vikas-parashar