{"action":"opened","issue":{"url":"https://api.github.com/repos/zopefoundation/five.pt/issues/5","labels_url":"https://api.github.com/repos/zopefoundation/five.pt/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/zopefoundation/five.pt/issues/5/comments","events_url":"https://api.github.com/repos/zopefoundation/five.pt/issues/5/events","html_url":"https://github.com/zopefoundation/five.pt/issues/5","id":100425925,"number":5,"title":"AttributeError while rendering image scale","user":{"login":"hvelarde","id":341393,"avatar_url":"https://avatars.githubusercontent.com/u/341393?v=3","gravatar_id":"","url":"https://api.github.com/users/hvelarde","html_url":"https://github.com/hvelarde","followers_url":"https://api.github.com/users/hvelarde/followers","following_url":"https://api.github.com/users/hvelarde/following{/other_user}","gists_url":"https://api.github.com/users/hvelarde/gists{/gist_id}","starred_url":"https://api.github.com/users/hvelarde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvelarde/subscriptions","organizations_url":"https://api.github.com/users/hvelarde/orgs","repos_url":"https://api.github.com/users/hvelarde/repos","events_url":"https://api.github.com/users/hvelarde/events{/privacy}","received_events_url":"https://api.github.com/users/hvelarde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-11T22:32:00Z","updated_at":"2015-08-11T22:32:00Z","closed_at":null,"body":"Plone 4.3.6\r\nfive.pt 2.2.3\r\n\r\nrendering the following template:\r\n\r\n```xml\r\n<div id=\"media\" tal:condition=\"context/getImage\">\r\n  <img tal:replace=\"structure context/@@images/image/large\" />\r\n  <p class=\"discreet\"\r\n      tal:condition=\"context/imageCaption\"\r\n      tal:content=\"context/imageCaption\">\r\n    Image Caption\r\n  </p>\r\n</div>\r\n```\r\n\r\ncauses the following exception:\r\n\r\n```python\r\n2015-08-11 19:13:21 ERROR plone.app.viewletmanager rendering of plone.abovecontentbody in collective.nitf.image fails: 'tuple' object has no attribute 'pop'\r\n\r\n - Expression: \"context/@@images/image/large\"\r\n - Filename:   ... tive.nitf/src/collective/nitf/browser/templates/image.pt\r\n - Location:   (line 2: col 30)\r\n - Source:     ... replace=\"structure context/@@images/image/large\" />\r\n                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n - Arguments:  repeat: {...} (0)\r\n               template: <ViewPageTemplateFile - at 0x7fe0bf278c90>\r\n               views: <ViewMapper - at 0x7fe0bd471750>\r\n               modules: <instance - at 0x7fe0c8a96c20>\r\n               args: <tuple - at 0x7fe0d34b7050>\r\n               here: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               user: <ImplicitAcquisitionWrapper - at 0x7fe0c1c655f0>\r\n               nothing: <NoneType - at 0x7ad090>\r\n               container: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               request: <instance - at 0x7fe0c128eea8>\r\n               wrapped_repeat: <SafeMapping - at 0x7fe0c0667f70>\r\n               traverse_subpath: <list - at 0x7fe0bd342200>\r\n               default: <object - at 0x7fe0d348db30>\r\n               loop: {...} (0)\r\n               context: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               view: <SimpleViewletClass from /home/hvelarde/simples/XYZ/src/collective.nitf/src/collective/nitf/browser/templates/image.pt collective.nitf.image at 0x7fe0bd45fe50>\r\n               translate: <function translate at 0x7fe0bd32a2a8>\r\n               root: <ImplicitAcquisitionWrapper Zope at 0x7fe0c1797910>\r\n               options: {...} (0)\r\n               target_language: pt_BR\r\nTraceback (most recent call last):\r\n  File \"/home/hvelarde/.buildout/eggs/plone.app.viewletmanager-2.0.8-py2.7.egg/plone/app/viewletmanager/manager.py\", line 110, in render\r\n    html.append(viewlet.render())\r\n  File \"/home/hvelarde/.buildout/eggs/zope.browserpage-3.12.2-py2.7.egg/zope/browserpage/simpleviewclass.py\", line 44, in __call__\r\n    return self.index(*args, **kw)\r\n  File \"/home/hvelarde/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Products/Five/browser/pagetemplatefile.py\", line 125, in __call__\r\n    return self.im_func(im_self, *args, **kw)\r\n  File \"/home/hvelarde/.buildout/eggs/Zope2-2.13.22-py2.7.egg/Products/Five/browser/pagetemplatefile.py\", line 59, in __call__\r\n    sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),\r\n  File \"/home/hvelarde/.buildout/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py\", line 132, in pt_render\r\n    strictinsert=0, sourceAnnotations=sourceAnnotations\r\n  File \"/home/hvelarde/.buildout/eggs/five.pt-2.2.3-py2.7.egg/five/pt/engine.py\", line 93, in __call__\r\n    return self.template.render(**kwargs)\r\n  File \"/home/hvelarde/.buildout/eggs/z3c.pt-2.2.3-py2.7.egg/z3c/pt/pagetemplate.py\", line 149, in render\r\n    return base_renderer(**context)\r\n  File \"/home/hvelarde/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/zpt/template.py\", line 258, in render\r\n    return super(PageTemplate, self).render(**vars)\r\n  File \"/home/hvelarde/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/template.py\", line 191, in render\r\n    raise_with_traceback(exc, tb)\r\n  File \"/home/hvelarde/.buildout/eggs/Chameleon-2.22-py2.7.egg/chameleon/template.py\", line 171, in render\r\n    self._render(stream, econtext, rcontext)\r\n  File \"/home/hvelarde/simples/XYZ/var/chameleon-cache/050b09e2d39c4cbadb7a720bacda1307.py\", line 110, in render\r\n    __cache_140603222778256 = _static_140603294958160(getitem('context'), econtext, True, ('@@images', 'image', 'large', ))\r\n  File \"/home/hvelarde/.buildout/eggs/five.pt-2.2.3-py2.7.egg/five/pt/expressions.py\", line 154, in __call__\r\n    base = self.traverse(base, request, path_items)\r\n  File \"/home/hvelarde/.buildout/eggs/five.pt-2.2.3-py2.7.egg/five/pt/expressions.py\", line 126, in traverse\r\n    base, name, path_items[i:], request=request\r\n  File \"/home/hvelarde/.buildout/eggs/zope.traversing-3.13.2-py2.7.egg/zope/traversing/adapters.py\", line 136, in traversePathElement\r\n    return traversable.traverse(nm, further_path)\r\n  File \"/home/hvelarde/.buildout/eggs/plone.app.imaging-1.0.11-py2.7.egg/plone/app/imaging/scaling.py\", line 83, in traverse\r\n    image = self.scale(name, furtherPath.pop())\r\nAttributeError: 'tuple' object has no attribute 'pop'\r\n\r\n - Expression: \"context/@@images/image/large\"\r\n - Filename:   ... tive.nitf/src/collective/nitf/browser/templates/image.pt\r\n - Location:   (line 2: col 30)\r\n - Source:     ... replace=\"structure context/@@images/image/large\" />\r\n                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n - Arguments:  repeat: {...} (0)\r\n               template: <ViewPageTemplateFile - at 0x7fe0bf278c90>\r\n               views: <ViewMapper - at 0x7fe0bd471750>\r\n               modules: <instance - at 0x7fe0c8a96c20>\r\n               args: <tuple - at 0x7fe0d34b7050>\r\n               here: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               user: <ImplicitAcquisitionWrapper - at 0x7fe0c1c655f0>\r\n               nothing: <NoneType - at 0x7ad090>\r\n               container: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               request: <instance - at 0x7fe0c128eea8>\r\n               wrapped_repeat: <SafeMapping - at 0x7fe0c0667f70>\r\n               traverse_subpath: <list - at 0x7fe0bd342200>\r\n               default: <object - at 0x7fe0d348db30>\r\n               loop: {...} (0)\r\n               context: <ImplicitAcquisitionWrapper cresce-o-numero-de-conflitos-e-a-violencia-no-campo-e-a-justica at 0x7fe0c239caa0>\r\n               view: <SimpleViewletClass from /home/hvelarde/simples/XYZ/src/collective.nitf/src/collective/nitf/browser/templates/image.pt collective.nitf.image at 0x7fe0bd45fe50>\r\n               translate: <function translate at 0x7fe0bd32a2a8>\r\n               root: <ImplicitAcquisitionWrapper Zope at 0x7fe0c1797910>\r\n               options: {...} (0)\r\n               target_language: pt_BR\r\n```\r\n\r\nremoving five.pt from the project solves the issue."}}