Seems that under some weird circumstances there can be img tags without src attributes; we need to gracefully handle this exception and point to the object responsible of this situation:
2016-04-06T01:18:39 ERROR plone.transformchain Unexpected error whilst trying to apply transform chain
Traceback (most recent call last):
File "/home/cartacapital/cartacapital.portal.buildout/eggs/plone.transformchain-1.0.3-py2.7.egg/plone/transformchain/transformer.py", line 48, in __call__
newResult = handler.transformIterable(result, encoding)
File "/home/cartacapital/cartacapital.portal.buildout/eggs/collective.lazysizes-1.4.0a1-py2.7.egg/collective/lazysizes/transform.py", line 103, in transformIterable
self._lazyload(el)
File "/home/cartacapital/cartacapital.portal.buildout/eggs/collective.lazysizes-1.4.0a1-py2.7.egg/collective/lazysizes/transform.py", line 57, in _lazyload
element.attrib['data-src'] = element.attrib['src']
File "lxml.etree.pyx", line 2200, in lxml.etree._Attrib.__getitem__ (src/lxml/lxml.etree.c:49210)
KeyError: 'src'
Seems that under some weird circumstances there can be
img
tags withoutsrc
attributes; we need to gracefully handle this exception and point to the object responsible of this situation: