[Zope-dev] Re: Nasty error message with obscure bug
Florent Guillaume
fg at nuxeo.com
Sat Jun 17 15:24:52 EDT 2006
Chris Withers wrote:
> Got this weird error message:
> Module TAL.TALInterpreter, line 701, in translate
> Module Products.PageTemplates.TALES, line 261, in translate
> Module Products.Five.i18n, line 51, in translate
> Module Products.PageTemplates.GlobalTranslationService, line 33, in
> translate
> TypeError: expected string or buffer
>
> ...and eventually tracked it down to this code:
>
> <meta name="description" content="blah"
> i18n:attributes="description"/>
>
> The bug, of course, is that the i18:attributes should be content, not
> description, which doesn't exist.
>
> This results in a None msgid, which PTS used to do something (I don't
> know whether it was sane or not, no errors) with but which raises the
> rather obscure error above.
>
> I don't know if anything should be done here. Obviously it'd be nice if
> the error message was a bit nicer ("i18:attributes specified attribute
> 'description', which did not exist on tag 'meta' in
> /standard_template.pt") but it's a pretty obscure error.
>
> If anyone with greater knowledge could implement the above without much
> pain, that'd be great. In any case, hopefully Google will catch this
> some time and save the next weary traveller who bumps into it a couple
> of hours ;-)
How about opening a ticket in the collector?
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-Dev
mailing list