GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Malthe says "You're trying to include a macro which is not a macro, but a string."
Traceback (most recent call last):
File "...-12082011/src/ploud.zope/ploud/zope/publisher.py", line 206, in publish_module
response = _publish(request, 'ploud_application_%s'%name)
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/ZPublisher/WSGIPublisher.py", line 195, in publish
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/ZPublisher/Publish.py", line 46, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/Shared/DC/Scripts/Bindings.py", line 322, in __call__
return self._bindAndExec(args, kw, None)
File "...-12082011/src/ploud.zope/ploud/zope/patches.py", line 82, in _bindAndExec
return self._exec(bound_data, args, kw)
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/Products/PageTemplates/ZopePageTemplate.py", line 334, in _exec
result = self.pt_render(extra_context=bound_names)
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/Products/PageTemplates/ZopePageTemplate.py", line 431, in pt_render
result = PageTemplate.pt_render(self, source, extra_context)
File "...-12082011/eggs/Zope2-2.13.10-py2.7.egg/Products/PageTemplates/PageTemplate.py", line 79, in pt_render
File "...-12082011/eggs/zope.pagetemplate-3.6.3-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 132, in pt_render
File "...-12082011/eggs/five.pt-2.2.0-py2.7.egg/five/pt/engine.py", line 93, in __call__
File "...-12082011/eggs/z3c.pt-2.1.5-py2.7.egg/z3c/pt/pagetemplate.py", line 149, in render
File "...-12082011/eggs/Chameleon-2.6.2-py2.7.egg/chameleon/zpt/template.py", line 247, in render
return super(PageTemplate, self).render(**vars)
File "...-12082011/eggs/Chameleon-2.6.2-py2.7.egg/chameleon/template.py", line 175, in render
self._render(stream, econtext, rcontext)
File "a4ad3b69425bdcc774d202c75459f236faf77643.py", line 609, in render
File "d4a0fcc9eeb63c6c6fa3fb6170414fb74118c2f6.py", line 2040, in render_master
File "d4a0fcc9eeb63c6c6fa3fb6170414fb74118c2f6.py", line 791, in render_content
File "a4ad3b69425bdcc774d202c75459f236faf77643.py", line 597, in __fill_content_core
File "a4ad3b69425bdcc774d202c75459f236faf77643.py", line 98, in render_content_core
AttributeError: 'unicode' object has no attribute 'include'
I was also bitten by this. Turns out we override a template containing a macro. Our overridden template didn't contain any macros anymore.
Maybe you need to use something like load: your-template.pt – ?
It's solved for us. We undid the override. Another option would have been to create an empty macro.
I was just writing it here to give a pointer to people that might run into this in the future. Maybe a PR to update the Caveats section would have clearer.
Fixed in a7811ec.